I just spun up a new Rackspace cloud server and ran the following:
apt-get install php5 nginx php-fpm When I navigate to the IP address, I see the default Nginx message. I then copied my /etc/nginx/sites-available/default file from another working setup I have:
server { listen 80; server_name localhost; root /srv/www; index index.php; location / { try_files $uri $uri/ /controllers$uri.php; location ~ \.php$ { try_files $uri /index.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; } } } I created index.php in /srv/www and started nginx and php-fpm:
/etc/init.d/nginx start /etc/init.d/php5-fpm start I'm getting a 502 Bad Gateway error. Am I doing something wrong?