conf/nginx.conf - nginx


  1. #user  nobody;
  2. worker_processes  1;

  3. #error_log  logs/error.log;
  4. #error_log  logs/error.log  notice;
  5. #error_log  logs/error.log  info;

  6. #pid        logs/nginx.pid;


  7. events {
  8.     worker_connections  1024;
  9. }


  10. http {
  11.     include       mime.types;
  12.     default_type  application/octet-stream;

  13.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  14.     #                  '$status $body_bytes_sent "$http_referer" '
  15.     #                  '"$http_user_agent" "$http_x_forwarded_for"';

  16.     #access_log  logs/access.log  main;

  17.     sendfile        on;
  18.     #tcp_nopush     on;

  19.     #keepalive_timeout  0;
  20.     keepalive_timeout  65;

  21.     #gzip  on;

  22.     server {
  23.         listen       80;
  24.         server_name  localhost;

  25.         #access_log  logs/host.access.log  main;

  26.         location / {
  27.             root   html;
  28.             index  index.html index.htm;
  29.         }

  30.         #error_page  404              /404.html;

  31.         # redirect server error pages to the static page /50x.html
  32.         #
  33.         error_page   500 502 503 504  /50x.html;
  34.         location = /50x.html {
  35.             root   html;
  36.         }

  37.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  38.         #
  39.         #location ~ \.php$ {
  40.         #    proxy_pass   http://127.0.0.1;
  41.         #}

  42.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  43.         #
  44.         #location ~ \.php$ {
  45.         #    root           html;
  46.         #    fastcgi_pass   127.0.0.1:9000;
  47.         #    fastcgi_index  index.php;
  48.         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  49.         #    include        fastcgi_params;
  50.         #}

  51.         # deny access to .htaccess files, if Apache's document root
  52.         # concurs with nginx's one
  53.         #
  54.         #location ~ /\.ht {
  55.         #    deny  all;
  56.         #}
  57.     }


  58.     # another virtual host using mix of IP-, name-, and port-based configuration
  59.     #
  60.     #server {
  61.     #    listen       8000;
  62.     #    listen       somename:8080;
  63.     #    server_name  somename  alias  another.alias;

  64.     #    location / {
  65.     #        root   html;
  66.     #        index  index.html index.htm;
  67.     #    }
  68.     #}


  69.     # HTTPS server
  70.     #
  71.     #server {
  72.     #    listen       443 ssl;
  73.     #    server_name  localhost;

  74.     #    ssl_certificate      cert.pem;
  75.     #    ssl_certificate_key  cert.key;

  76.     #    ssl_session_cache    shared:SSL:1m;
  77.     #    ssl_session_timeout  5m;

  78.     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  79.     #    ssl_prefer_server_ciphers  on;

  80.     #    location / {
  81.     #        root   html;
  82.     #        index  index.html index.htm;
  83.     #    }
  84.     #}

  85. }