upstream php {
server unix:/tmp/php-cgi.socket;
server 127.0.0.1:9000;
}
server {
listen 80;
root /var/www/html;
index index.php index.html index.nginx-debian.html;
server_name bikelife.cl www.bikelife.cl;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
#NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini
include fastcgi.conf;
include fastcgi_params;
fastcgi_pass php;
include snippets/fastcgi-php.conf;
}
location ~ /\.ht {
deny all;
}
}
server {
listen 80;
root /var/www/dev-html;
index index.php index.html index.nginx-debian.html;
server_name dev.bikelife.cl;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
#NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini
include fastcgi.conf;
include fastcgi_params;
fastcgi_pass php;
include snippets/fastcgi-php.conf;
}
location ~ /\.ht {
deny all;
}
}