Welcome! Log In Create A New Profile

Advanced

"invalid number of arguments in "try_files" directive...

Posted by HittingSmoke 
"invalid number of arguments in "try_files" directive...
June 27, 2013 01:18PM
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?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready