I try to embed a wordpress instance to nginx server that also works with my already installed Rails application. I used all the same with that writing (HOWTO: Install WordPress on Nginx; no Date given) but it gives 403 error for all requests.
How could I understand the reason of that permission error. Logs does not include further information. Is it about the permission problem on fast-cgi or any running process?
This is also my current setting:
server{
listen 80;
server_name www.bla.com bla.com;
root /opt/nginx/wordpress/;
try_files $uri $uri/ /index.php;
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass localhost:53217;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
403 is the HTTP status code for “Forbidden”.
I recommend debugging it by continuing to simplify your server configuration until you quit getting the error. The problem is then in whatever you removed last. :).
For example, you could temporarily comment your rails app and see if you still get the problem, and then try commenting out all our some of your wordpress server{} definition and see if you still have the problem.
I also recommend searching through your nginx configuration for the words ‘allow’ and ‘deny’ as they are used to control access. If access is “denied” to a location, it could result in a 403.