Solved Wordpress/Nginx installation problem

Hello everyone,

I have a problem that make no sense to me:(
I have a web server running inside a jail.. in it I have Zabbix, Joomla, Static HTML and PHP sites that are all working just fine...
When I try to do the wordpress 5 minutes install, I get
Code:
An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.
The error log has
Code:
root@webjail: # cat error.log
2014/03/11 13:20:04 [notice] 4376#0: *1 "/wp-admin$" does not match "/", client: 213.146.159.xxx, server: mysite.fr, request: "GET / HTTP/1.1", host: "www.mysite.fr"
2014/03/11 13:20:04 [notice] 4376#0: *1 "/wp-admin$" does not match "/index.php", client: 213.146.159.xxx, server: mysite.fr, request: "GET / HTTP/1.1", host: "www.mysite.fr"
2014/03/11 13:20:04 [notice] 4376#0: *1 "/wp-admin$" does not match "/50x.html", client: 213.146.159.xxx, server: mysite.fr, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock", host: "www.mysite.fr"
nginx.conf
Code:
user  www www;
worker_processes 1;
worker_priority 15;

pid /var/run/nginx.pid;
error_log  /var/log/nginx/error.log  error;
#access_log /var/log/nginx/access.log

events {
  worker_connections  512;
  accept_mutex on;
  use kqueue;
}

http {
  include       conf.d/options;
  include       mime.types;
  default_type  application/octet-stream;
  access_log  /var/log/nginx/access.log main buffer=32k;

  include sites/*.site;
}
options
Code:
client_body_timeout  5s;
client_header_timeout  5s;
keepalive_timeout  75s;
send_timeout  15s;
charset  utf-8;
gzip  off;
gzip_static  on;
gzip_proxied  any;
ignore_invalid_headers  on;
keepalive_requests  50;
keepalive_disable  none;
max_ranges  1;
msie_padding  off;
open_file_cache  max=1000 inactive=2h;
open_file_cache_errors  on;
open_file_cache_min_uses  1;
open_file_cache_valid  1h;
output_buffers  1 512;
postpone_output  1440;
read_ahead  512K;
recursive_error_pages  on;
reset_timedout_connection  on;
sendfile  on;
server_tokens  off;
server_name_in_redirect  off;
source_charset  utf-8;
tcp_nodelay  on;
tcp_nopush  off;
spdy_keepalive_timeout  123s;
spdy_recv_timeout       4s;
gzip_disable  "MSIE [1-6]\.(?!.*SV1)";
limit_req_zone  $binary_remote_addr  zone=gulag:1m   rate=60r/m;
log_format  main  '$remote_addr $host $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $ssl_cipher $request_time';
notworking.site
Code:
server {
        server_name mysite.fr www.mysite.fr;
        access_log  /www/webs/mysite_fr/logs/access.log;
        error_log   /www/webs/mysite_fr/logs/error.log debug;
        add_header  Cache-Control "public";
        add_header  X-Frame-Options "DENY";
        limit_req   zone=gulag burst=200 nodelay;
        expires     max;

        listen 80;
        listen 443 ssl;
        include conf.d/wp-security;
        root /www/webs/westane_fr;
        index index.html index.htm index.php;

        location = /favicon.ico { return 204; }

        location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ { deny all; }

        location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
        }

        location / {
                root /www/webs/mysite_fr/httpdocs;
                try_files $uri $uri/ /index.php?$args;

                        location ~ \.php$ { include conf.d/php-fpm; }
        }

        location ~ \.php$ { include conf.d/php-fpm; }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html { root   /www/nginx-dist; }
}
wp-security
Code:
# Common root location
#  location / {
#    This try_files directive is used to enable pretty, SEO-friendly URLs
#    and permalinks for Wordpress. Leave it *off* to start with, and then
#    turn it on once you've gotten Wordpress configured!
#    try_files $uri $uri/ /index.php?$args;
#  }

#    This location pevents any requests for the Wordpress admin interface
#    from being accepted if those requests don't come from your LAN. This
#    is optional but recommended.
  #location ~* wp-admin {
      #try_files $uri $uri/ =404;
      #allow 213.146.159.254;
      #allow 82.31.44.171;
      #allow 127.0.0.1;
      #deny all;
  }

#    Show "Not Found" 404 errors in place of "Forbidden" 403 errors, because
#    forbidden errors allow attackers potential insight into your server's
#    layout and contents
  error_page 403 =404;

#    Prevent access to any files starting with a dot, like .htaccess
#    or text editor temp files
##  location ~ /\. { access_log off; log_not_found off; deny all; }

#    Prevent access to any files starting with a $ (usually temp files)
  location ~ ~$ { access_log off; log_not_found off; deny all; }

#    Do not log access to robots.txt, to keep the logs cleaner
  location = /robots.txt { access_log off; log_not_found off; }

#    Do not log access to the favicon, to keep the logs cleaner
##  location = /favicon.ico { access_log off; log_not_found off; }

#    Keep images and CSS around in browser cache for as long as possible,
#    to cut down on server load
  location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
      expires max;
      log_not_found off;
  }

#    Common deny or internal locations, to help prevent access to areas of
#    the site that should not be public
  location ~* wp-admin/includes { deny all; }
  location ~* wp-includes/theme-compat/ { deny all; }
  location ~* wp-includes/js/tinymce/langs/.*\.php { deny all; }
  location /wp-content/ { internal; }
  location /wp-includes/ { internal; }
#    The next line protects the wp-config.php file from being accessed, but
#    we need to be able to run the file for the initial site setup. Uncomment
#    the next line after setup is completed and reload Nginx.
#    location ~* wp-config.php { deny all; }

#    Prevent any potentially-executable files in the uploads directory from
#    being executed by forcing their MIME type to text/plain
  location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php)$ {
      types { }
      default_type text/plain;
  }

#    Add trailing slash to */wp-admin requests so the admin interface
#    works correctly
  rewrite /wp-admin$ $scheme://$host$uri/ permanent;

Thank you in advance
 
@fred974 what was the solution for the problem?

I have the same problem:
Code:
*1 "/wp-admin$" does not match "/", client: 179.210.61.120, server: jic.if.ufrj.br, request: "GET / HTTP/1.1", host: "jic.if.ufrj.br"
2014/05/22 21:55:30 [notice] 23533#0: *1 "/wp-admin$" does not match "/index.php", client: 179.210.61.120, server: jic.if.ufrj.br, request: "GET / HTTP/1.1", host: "jic.if.ufrj.br"
2014/05/22 21:55:30 [notice] 23533#0: *1 "/wp-admin$" does not match "/50x.html", client: 179.210.61.120, server: jic.if.ufrj.br, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock", host: "jic.if.ufrj.br"

Thanks.
 
Last edited by a moderator:
I know this is an old post, but in case it helps anyone else... You have to start php-fpm before browsing to WP. For me, that command is: launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
 
I know this is an old post, but in case it helps anyone else... You have to start php-fpm before browsing to WP. For me, that command is: launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
Old thread and a solution that only works on OS-X.

Please read rule #7: FreeBSD Forums Rules
 
Back
Top