My original error was alot like this:
nginx configuration for Laravel 4
but after modifying the Nginx config server block heavily from advice from multiple forum topics I either get the same error in which the first page is displayed, but any link using a route returns 404, or I get a 502.
/nginx/sites-available/default:
server { listen 80; server_name sub.domain.com; set $root_path '/usr/share/nginx/html/laravel/public'; root $root_path; index index.php index.html index.htm; try_files $uri $uri/ @rewrite; location @rewrite { rewrite ^/(.*)$ /index.php?_url=/$1; } location ~ \.php { fastcgi_pass 127.0.0.1:9000; fastcgi_index /index.php; include /etc/nginx/fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~* ^/(css|img|js|flv|swf|download)/(.+)$ { root $root_path; } location ~ /\.ht { deny all; } } Error Log:
2014/01/22 16:51:12 [error] 14274#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxx.xxx.xxx.xxx"
/etc/php5/fpm/pools/folder ?listen, you'll find 2, but only 1 will be uncommented, what does it say ?