I'm having issues with getting Nginx running after installing from source. I'm getting an error on run:
[CODE]"[emerg] invalid number of arguments in "try_files" directive in /home/.../nginx/conf/sites-enabled/default:11"[/CODE]
This line is the PHP execution protection outlined in the pitfalls page. My nginx.conf and my sites-available/default file is as follows:
[CODE]
worker_processes 1;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 5m;
include /home/${USER}/nginx/conf/mime.types;
default_type application/octet-stream;
gzip on;
gzip_disable \"msie6\";
include /home/${USER}/nginx/conf/sites-enabled/*;
}[/CODE]
and
[CODE]
server {
listen ${listen_port};
root /home/${USER}/nginx/html/;
index index.php index.html index.htm;
server_name _;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/home/${USER}/php-5.3/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}[/CODE]
${USER} and ${listen_port} are set properly, this is just the copy/paste from what my deployment script is echoing.
What am I doing wrong here?