Guest User

Untitled

a guest
Jul 15th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. user www-data;
  2. worker_processes 2;
  3. timer_resolution 100ms;
  4.  
  5. error_log /var/log/nginx/error.log;
  6. pid /var/run/nginx.pid;
  7.  
  8. events {
  9.     worker_connections  2048;
  10.     use epoll;
  11.     multi_accept on;
  12. }
  13.  
  14. http {
  15.     include       mime.types;
  16.     default_type  application/octet-stream;
  17.  
  18.     access_log off;
  19.  
  20.     sendfile       on;
  21.     tcp_nopush     on;
  22.    
  23.     keepalive_timeout  0;
  24.     #gzip  on;
  25.  
  26.     server {
  27.         listen       ...:80;
  28.         server_name  ...;
  29.         root /usr/local/nginx/html;
  30.  
  31.         #charset koi8-r;
  32.         #access_log  logs/host.access.log  main;
  33.         client_max_body_size 64m;
  34.  
  35.         # redirect server error pages to the static page /50x.html
  36.         error_page 500 502 503 504 /50x.html;
  37.         location = /50x.html {
  38.             root   html;
  39.         }
  40.        
  41.         location ~* \.(sql|py)$ {
  42.             deny all;
  43.             access_log off;
  44.             log_not_found off;
  45.         }
  46.  
  47.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  48.         location / {
  49.             index index.php;
  50.             location ~* \.php$ {
  51.                 include fastcgi_params;
  52.                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  53.                 # fastcgi_pass unix:/var/run/php5-fpm.sock;
  54.                 fastcgi_pass 127.0.0.1:9000;
  55.             }
  56.         }
  57.        
  58.         location ~ /\. {
  59.             deny all;
  60.             access_log off;
  61.             log_not_found off;
  62.         }
  63.     }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment