nebukad

Nginx.conf

Apr 15th, 2016
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.39 KB | None | 0 0
  1. #user  nobody;
  2. worker_processes  1;
  3.  
  4. #error_log  logs/error.log;
  5. #error_log  logs/error.log  notice;
  6. #error_log  logs/error.log  info;
  7.  
  8. #pid        logs/nginx.pid;
  9.  
  10.  
  11. events {
  12.     worker_connections  1024;
  13. }
  14.  
  15.  
  16. http {
  17.     include       mime.types;
  18.     default_type  application/octet-stream;
  19.  
  20.     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  21.                       '$status $body_bytes_sent "$http_referer" '
  22.                       '"$http_user_agent" "$http_x_forwarded_for"';
  23.  
  24.     access_log  /usr/local/etc/nginx/logs/access.log  main;
  25.     error_log   /usr/local/etc/nginx/logs/error.log;
  26.  
  27.     sendfile        on;
  28.     #tcp_nopush     on;
  29.  
  30.     #keepalive_timeout  0;
  31.     keepalive_timeout  65;
  32.  
  33.     #gzip  on;
  34.  
  35.     index index.html index.php;
  36.  
  37.     #server {
  38.     #    listen       80;
  39.     #    server_name  localhost;
  40.  
  41.     #    #charset koi8-r;
  42.  
  43.     #    access_log  /usr/local/etc/nginx/logs/localhost.access.log  main;
  44.  
  45.     #    location / {
  46.                 #include        /usr/local/etc/nginx/conf.d/php-fpm;
  47. #               proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  48. #               proxy_redirect off;
  49. #               proxy_buffering off;
  50. #               proxy_set_header        Host            $host;
  51. #               proxy_set_header        X-Real-IP       $remote_addr;
  52. #               proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
  53.                 #root   html;
  54.                 #index  index.html index.htm;
  55. #        }
  56.  
  57.         #error_page  404              /404.html;
  58.  
  59.         # redirect server error pages to the static page /50x.html
  60.         #
  61. #        error_page   500 502 503 504  /50x.html;
  62. #        location = /50x.html {
  63. #            root   html;
  64. #        }
  65.  
  66.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  67.         #
  68.         #location ~ \.php$ {
  69.         #    proxy_pass   http://127.0.0.1;
  70.         #}
  71.  
  72.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  73.         #
  74. #        location ~ \.php$ {
  75.         #    root           html;
  76. #            fastcgi_pass   127.0.0.1:9000;
  77. #            fastcgi_index  index.php;
  78. #            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  79. #            include        fastcgi_params;
  80. #        }
  81.  
  82.         # deny access to .htaccess files, if Apache's document root
  83.         # concurs with nginx's one
  84.         #
  85.         #location ~ /\.ht {
  86.         #    deny  all;
  87.         #}
  88. #    }
  89.  
  90.  
  91.     # another virtual host using mix of IP-, name-, and port-based configuration
  92.     #
  93.     #server {
  94.     #    listen       8000;
  95.     #    listen       somename:8080;
  96.     #    server_name  somename  alias  another.alias;
  97.  
  98.     #    location / {
  99.     #        root   html;
  100.     #        index  index.html index.htm;
  101.     #    }
  102.     #}
  103.  
  104.  
  105.     # HTTPS server
  106.     #
  107.     #server {
  108.     #    listen       443 ssl;
  109.     #    server_name  localhost;
  110.  
  111.     #    ssl_certificate      cert.pem;
  112.     #    ssl_certificate_key  cert.key;
  113.  
  114.     #    ssl_session_cache    shared:SSL:1m;
  115.     #    ssl_session_timeout  5m;
  116.  
  117.     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  118.     #    ssl_prefer_server_ciphers  on;
  119.  
  120.     #    location / {
  121.     #        root   html;
  122.     #        index  index.html index.htm;
  123.     #    }
  124.     #}
  125.  
  126.     #include servers/*;
  127.  
  128.     include /usr/local/etc/nginx/sites-enabled/*;
  129. }
Advertisement
Add Comment
Please, Sign In to add comment