#user html; worker_processes 2; #error_log logs/error.log; error_log /var/log/nginx/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 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) fastcgi_pass unix:/run/php-fpm/php-fpm.sock; fastcgi_index index.php; include fastcgi.conf; } location ~ \.py$ { gzip off; fastcgi_pass unix:/run/fcgiwrap.sock; fastcgi_index index.py; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; } location ~ /\.ht { deny all; } } }