xref: /f-stack/app/nginx-1.16.1/conf/nginx.conf (revision 3da8d17d)
1# root account is necessary.
2user  root;
3# should be equal to the lcore count of `dpdk.lcore_mask` in f-stack.conf.
4worker_processes  1;
5
6#error_log  logs/error.log;
7#error_log  logs/error.log  notice;
8#error_log  logs/error.log  info;
9
10#pid        logs/nginx.pid;
11
12# path of f-stack configuration file, default: $NGX_PREFIX/conf/f-stack.conf.
13fstack_conf f-stack.conf;
14
15events {
16    worker_connections  102400;
17    use kqueue;
18}
19
20
21http {
22    include       mime.types;
23    default_type  application/octet-stream;
24
25    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
26    #                  '$status $body_bytes_sent "$http_referer" '
27    #                  '"$http_user_agent" "$http_x_forwarded_for"';
28
29    #access_log  logs/access.log  main;
30
31    sendfile        off;
32    #tcp_nopush     on;
33
34    #keepalive_timeout  0;
35    keepalive_timeout  65;
36
37    #gzip  on;
38
39    server {
40        listen       80;
41        server_name  localhost;
42
43        # bulid server on kernel network stack
44        #
45        #kernel_network_stack on;
46
47        #charset koi8-r;
48
49        access_log /dev/null;
50        #access_log  logs/host.access.log  main;
51
52        location / {
53            #root   html;
54            #index  index.html index.htm;
55            return 200 "<title>Welcome to F-Stack Nginx!</title>\r\n pad data:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789";
56        }
57
58        #error_page  404              /404.html;
59
60        # redirect server error pages to the static page /50x.html
61        #
62        error_page   500 502 503 504  /50x.html;
63        location = /50x.html {
64            root   html;
65        }
66
67        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
68        #
69        #location ~ \.php$ {
70        #    proxy_pass   http://127.0.0.1;
71        #}
72
73        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
74        #
75        #location ~ \.php$ {
76        #    root           html;
77        #    fastcgi_pass   127.0.0.1:9000;
78        #    fastcgi_index  index.php;
79        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
80        #    include        fastcgi_params;
81        #}
82
83        # deny access to .htaccess files, if Apache's document root
84        # concurs with nginx's one
85        #
86        #location ~ /\.ht {
87        #    deny  all;
88        #}
89    }
90
91
92    # another virtual host using mix of IP-, name-, and port-based configuration
93    #
94    #server {
95    #    listen       8000;
96    #    listen       somename:8080;
97    #    server_name  somename  alias  another.alias;
98
99    #    location / {
100    #        root   html;
101    #        index  index.html index.htm;
102    #    }
103    #}
104
105
106    # HTTPS server
107    #
108    #server {
109    #    listen       443 ssl;
110    #    server_name  localhost;
111
112    #    ssl_certificate      cert.pem;
113    #    ssl_certificate_key  cert.key;
114
115    #    ssl_session_cache    shared:SSL:1m;
116    #    ssl_session_timeout  5m;
117
118    #    ssl_ciphers  HIGH:!aNULL:!MD5;
119    #    ssl_prefer_server_ciphers  on;
120
121    #    location / {
122    #        root   html;
123    #        index  index.html index.htm;
124    #    }
125    #}
126
127}
128