#user html;
worker_processes 2;
error_log /var/log/nginx/error.log;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name localhost;
# root /usr/share/nginx/html;
root /var/www;
# charset koi8-r;
charset UTF-8;
location / {
index index.php index.html index.htm;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
location /phpmyadmin {
rewrite ^/* /phpMyAdmin last;
}
error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
#fastcgi_pass 127.0.0.1:9000; (depending on your php-fpm socket configuration)
root /var/www;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ \.py$ {
# include fastcgi.conf;
include fastcgi_params;
fastcgi_pass unix:/run/fcgiwrap.sock;
fastcgi_index index.py;
}
location ~ \.rb$ {
include fastcgi.conf;
fastcgi_pass unix:/run/fcgiwrap.sock;
fastcgi_index index.rb;
}
location ~ \.pl$ {
include fastcgi.conf;
fastcgi_pass unix:/run/fcgiwrap.sock;
fastcgi_index index.pl;
}
location ~ \.sh$ {
include fastcgi.conf;
fastcgi_pass unix:/run/fcgiwrap.sock;
fastcgi_index index.sh;
}
location ~ /\.ht {
deny all;
}
}
}