Ubuntu Nginx/Laravel 500 Internal Server Error
So I found the answer from a little more searching around. This page ultimately lead me to the answer: nginx configuration for Laravel 4
What I had to do was change the default config in /etc/nginx/sites-available/
and just change location / {}
and add location @rewrite
. The full config file I have is below with most of the #
commented lines out.
server { listen 80; ## listen for ipv4; this line is default and implied root /usr/share/nginx/www/DDbuddy/public; index index.php index.html index.htm; server_name localhost; location @rewrite { rewrite ^/(.*)$ /index.php?_url=/$1; } location / { try_files $uri $uri/ @rewrite; } location /doc/ { alias /usr/share/doc/; autoindex on; allow 127.0.0.1; deny all; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #}}