403 Forbidden On Nginx/1.4.6 (Ubuntu) - Laravel


Answer :

You need to specify an absolute path for your root directive. Nginx uses the directory set at compile time using the --prefix switch. By default this is /usr/local/nginx.

What this means is that your root, which is currently set to root home/laravel-app/ causes nginx to look for files at /usr/local/nginx/home/laravel-app/ which presumably isn't where your files are.

If you set your root directive to an absolute path such as /var/www/laravel-app/public/ nginx will find the files.

Similarly you'll note that I added /public/ to the path above. This is because Laravel stores it's index.php file there. If you were to just point at /laravel-app/ there's no index file and it'd give you a 403.


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?