Skip to content
Snippets Groups Projects
nginx.conf 882 B
Newer Older
Yifan Gao's avatar
Yifan Gao committed
daemon off;
master_process on;
user  nobody;
worker_processes  auto;

error_log  /var/log/nginx/error.log;

pid        /run/nginx.pid;

events {
    worker_connections  1024;
}


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

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

    access_log  /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  _;

        charset utf-8;

        root   /var/www;
        location / {
            index  index.html index.htm;
        }

        error_page  404              /404.html;
    }
}