summaryrefslogtreecommitdiff
path: root/nginx/nginx.conf
blob: 7dba8c08581636f0d234bb055384446e9d5d1aa1 (plain)
    1 #
    2 # /etc/nginx/nginx.conf - nginx server configuration
    3 #
    4 
    5 
    6 user nginx;
    7 worker_processes auto;
    8 
    9 error_log /var/log/nginx/error.log;
   10 
   11 pid /var/run/nginx.pid;
   12 
   13 
   14 events {
   15     worker_connections  1024;
   16 }
   17 
   18 
   19 http {
   20     include       mime.types;
   21     default_type  application/octet-stream;
   22 
   23     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
   24     #                  '$status $body_bytes_sent "$http_referer" '
   25     #                  '"$http_user_agent" "$http_x_forwarded_for"';
   26 
   27     access_log /var/log/nginx/access.log;
   28 
   29     sendfile        on;
   30     #tcp_nopush     on;
   31 
   32     keepalive_timeout  65;
   33 
   34     gzip  on;
   35 
   36     server {
   37         listen       80;
   38         server_name  localhost;
   39 
   40         #charset koi8-r;
   41 
   42         location / {
   43             root   html;
   44             index  index.html index.htm;
   45         }
   46 
   47         error_page  404              /404.html;
   48 
   49         # redirect server error pages to the static page /50x.html
   50         #
   51         error_page   500 502 503 504  /50x.html;
   52         location = /50x.html {
   53             root   html;
   54         }
   55 
   56         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
   57         #
   58         #location ~ \.php$ {
   59         #    proxy_pass   http://127.0.0.1;
   60         #}
   61 
   62         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
   63         #
   64         #location ~ \.php$ {
   65         #    root           html;
   66         #    fastcgi_pass   127.0.0.1:9000;
   67         #    fastcgi_index  index.php;
   68         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
   69         #    include        fastcgi_params;
   70         #}
   71 
   72         # deny access to .htaccess files, if Apache's document root
   73         # concurs with nginx's one
   74         #
   75         #location ~ /\.ht {
   76         #    deny  all;
   77         #}
   78     }
   79 
   80 
   81     # another virtual host using mix of IP-, name-, and port-based configuration
   82     #
   83     #server {
   84     #    listen       8000;
   85     #    listen       somename:8080;
   86     #    server_name  somename  alias  another.alias;
   87 
   88     #    location / {
   89     #        root   html;
   90     #        index  index.html index.htm;
   91     #    }
   92     #}
   93 
   94 
   95     # HTTPS server
   96     #
   97     #server {
   98     #    listen       443 ssl;
   99     #    server_name  localhost;
  100 
  101     #    ssl_certificate      cert.pem;
  102     #    ssl_certificate_key  cert.key;
  103 
  104     #    ssl_session_cache    shared:SSL:1m;
  105     #    ssl_session_timeout  5m;
  106 
  107     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  108     #    ssl_prefer_server_ciphers  on;
  109 
  110     #    location / {
  111     #        root   html;
  112     #        index  index.html index.htm;
  113     #    }
  114     #}
  115 
  116 }

Generated by cgit