1
2#user  nginx;
3worker_processes  1;
4
5# load_module lib64/nginx/modules/ngx_http_fancyindex_module.so;
6# load_module lib64/nginx/modules/ngx_http_geoip_module.so;
7# load_module lib64/nginx/modules/ngx_http_headers_more_filter_module.so;
8# load_module lib64/nginx/modules/ngx_http_image_filter_module.so;
9# load_module lib64/nginx/modules/ngx_http_perl_module.so;
10# load_module lib64/nginx/modules/ngx_http_xslt_filter_module.so;
11# load_module lib64/nginx/modules/ngx_mail_module.so;
12# load_module lib64/nginx/modules/ngx_rtmp_module.so;
13# load_module lib64/nginx/modules/ngx_stream_geoip_module.so;
14# load_module lib64/nginx/modules/ngx_stream_module.so;
15
16#error_log  /var/log/nginx/error.log;
17#error_log  /var/log/nginx/error.log  notice;
18#error_log  /var/log/nginx/error.log  info;
19
20#pid        /run/nginx.pid;
21
22
23events {
24    worker_connections  1024;
25    use epoll;
26}
27
28
29http {
30    include       mime.types;
31    default_type  application/octet-stream;
32
33    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
34    #                  '$status $body_bytes_sent "$http_referer" '
35    #                  '"$http_user_agent" "$http_x_forwarded_for"';
36
37    #access_log  /var/log/nginx/access.log  main;
38
39    sendfile        on;
40    #tcp_nopush     on;
41
42    #keepalive_timeout  0;
43    keepalive_timeout  65;
44
45    #gzip  on;
46
47    #include conf.d/*.conf;
48
49    server {
50        listen       80;
51        server_name  localhost;
52
53        #charset koi8-r;
54
55        #access_log  /var/log/nginx/host.access.log  main;
56
57        location / {
58            root   /srv/www/htdocs/;
59            index  index.html index.htm;
60        }
61
62        #error_page  404              /404.html;
63
64        # redirect server error pages to the static page /50x.html
65        #
66        error_page   500 502 503 504  /50x.html;
67        location = /50x.html {
68            root   /srv/www/htdocs/;
69        }
70
71        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
72        #
73        #location ~ \.php$ {
74        #    proxy_pass   http://127.0.0.1;
75        #}
76
77        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
78        #
79        #location ~ \.php$ {
80        #    root           /srv/www/htdocs/;
81        #    fastcgi_pass   127.0.0.1:9000;
82        #    fastcgi_index  index.php;
83        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
84        #    include        fastcgi_params;
85        #}
86
87        # deny access to .htaccess files, if Apache's document root
88        # concurs with nginx's one
89        #
90        #location ~ /\.ht {
91        #    deny  all;
92        #}
93    }
94
95
96    # another virtual host using mix of IP-, name-, and port-based configuration
97    #
98    #server {
99    #    listen       8000;
100    #    listen       somename:8080;
101    #    server_name  somename  alias  another.alias;
102
103    #    location / {
104    #        root   /srv/www/htdocs/;
105    #        index  index.html index.htm;
106    #    }
107    #}
108
109
110    # HTTPS server
111    #
112    #server {
113    #    listen       443 ssl;
114    #    server_name  localhost;
115
116    #    ssl_certificate      cert.pem;
117    #    ssl_certificate_key  cert.key;
118
119    #    Allow TLS version 1.2 only, which is a recommended default these days
120    #    by international information security standards.
121    #    ssl_protocols        TLSv1.2;
122
123    #    ssl_session_cache    shared:SSL:1m;
124    #    ssl_session_timeout  5m;
125
126    #    ssl_ciphers  HIGH:!aNULL:!MD5;
127    #    ssl_prefer_server_ciphers  on;
128
129    #    location / {
130    #        root   /srv/www/htdocs/;
131    #        index  index.html index.htm;
132    #    }
133    #}
134
135    include vhosts.d/*.conf;
136
137}
138