this is my /etc/nginx/sites-enabled/default file
server
{
listen 80;
server_name localhost;
# fast cgi support
include /etc/nginx/fcgiwrap.conf;
location /
{
root /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www;
index index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html
{
root /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www;
}
location ~ \.php$
{
#fastcgi_pass unix:/var/run/php5-fpm.sock;
root /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www$fastcgi_script_name;
include fastcgi_params;
}
}
and this is my /etc/nginx/fcgiwrap.conf
# Include this file on your nginx.conf to support debian cgi-bin scripts using
# fcgiwrap
location /cgi-bin/ {
# Disable gzip (it makes scripts feel slower since they have to complete
# before getting gzipped)
gzip off;
# Set the root to /usr/lib (inside this location this means that we are
# giving access to the files under /usr/lib/cgi-bin)
root /usr/lib;
# Fastcgi socket
fastcgi_pass unix:/var/run/fcgiwrap.socket;
# Fastcgi parameters, include the standard ones
include /etc/nginx/fastcgi_params;
# Adjust non standard parameters (SCRIPT_FILENAME)
fastcgi_param SCRIPT_FILENAME /usr/lib$fastcgi_script_name;
}
server
{
listen 80;
server_name localhost;
# fast cgi support
include /etc/nginx/fcgiwrap.conf;
location /
{
root /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www;
index index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html
{
root /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www;
}
location ~ \.php$
{
#fastcgi_pass unix:/var/run/php5-fpm.sock;
root /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/ottaviane/Sviluppo/Progetti/HTML-PHP/www.ottaviane.it/www$fastcgi_script_name;
include fastcgi_params;
}
}
and this is my /etc/nginx/fcgiwrap.conf
# Include this file on your nginx.conf to support debian cgi-bin scripts using
# fcgiwrap
location /cgi-bin/ {
# Disable gzip (it makes scripts feel slower since they have to complete
# before getting gzipped)
gzip off;
# Set the root to /usr/lib (inside this location this means that we are
# giving access to the files under /usr/lib/cgi-bin)
root /usr/lib;
# Fastcgi socket
fastcgi_pass unix:/var/run/fcgiwrap.socket;
# Fastcgi parameters, include the standard ones
include /etc/nginx/fastcgi_params;
# Adjust non standard parameters (SCRIPT_FILENAME)
fastcgi_param SCRIPT_FILENAME /usr/lib$fastcgi_script_name;
}