#user html; worker_processes 1; #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; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { client_max_body_size 128M; listen 80; server_name localhost; # # Aug/16/2016 # fastcgi_keep_conn on; # < solution proxy_buffering off; gzip off; # # #charset koi8-r; #access_log logs/host.access.log main; location / { root /var/www; index index.html index.htm index.php; } #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; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root /var/www; fastcgi_pass unix:/run/php-fpm/php-fpm.sock; fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; 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 /wordpress/ { try_files $uri $uri/ /wordpress/index.php?$args; } location ~* ^.+.(jpg|jpeg|gif|png|css|js|flv|swf|ico|xml)$ { access_log off; expires 30d; root /var/www; } } } #