I try to access to my cakephp project with my nginx config file. I have a 404 page not found with this config : root /app; index index.php; location /--redacted--/webroot/ { index index.php index.html index.htm; if (-f $request_filename) { break; } if (-d $request_filename) { break; } rewrite ^(.+)$ /index.php?q=$1 last; }
After reading multiples solutions, on multiple websites, I tried to put it as root and my index page works. Nginx config file looks like that then : root /app/--redacted--/webroot; index index.php; location / { index index.php index.html index.htm; if (-f $request_filename) { break; } if (-d $request_filename) { break; } rewrite ^(.+)$ /index.php?q=$1 last; }
The rest of the config file is the same in the cases. I search to understand why the behaviour of Nginx is so erratic. Why the first case doesn't work ? (Sorry if this is a repeated question ^^')
http://dlvr.it/RR9QBX
No hay comentarios:
Publicar un comentario