2019-01-04 01:47:10 -07:00
|
|
|
#######
|
|
|
|
### NGINX basic configuration
|
|
|
|
#######
|
|
|
|
|
|
|
|
user www-data;
|
|
|
|
worker_processes auto;
|
|
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
|
|
|
|
|
|
# include any dynamically linked modules
|
|
|
|
include /etc/nginx/modules/*.conf;
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
multi_accept off;
|
|
|
|
use epoll;
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
server_names_hash_bucket_size 64;
|
|
|
|
default_type text/plain;
|
|
|
|
charset utf-8;
|
|
|
|
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
|
|
|
|
# include enabled configuration options from cond.d/enabled/*.conf
|
|
|
|
include /etc/nginx/conf.d/enabled/*.conf;
|
|
|
|
|
|
|
|
# set default index options for all sites
|
|
|
|
index index.html index.htm;
|
|
|
|
|
2019-01-04 02:45:37 -07:00
|
|
|
# set default document root for all sites
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
2019-01-04 01:47:10 -07:00
|
|
|
# logging options
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] $request '
|
|
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
|
|
'"$http_user_agent" "$http_x_forwarded_for" '
|
|
|
|
'"$host" server="$server_name" '
|
|
|
|
'reqtime="$request_time" '
|
|
|
|
'uaddr="$upstream_addr" ustat="$upstream_status" '
|
|
|
|
'utime="$upstream_response_time" ulen="$upstream_response_length" '
|
|
|
|
'cache="$upstream_cache_status"';
|
|
|
|
|
|
|
|
# turn logging off by default (performance reasons, uncomment for
|
|
|
|
# troubleshooting)
|
|
|
|
#access_log /var/log/nginx/access.log main;
|
|
|
|
access_log off;
|
|
|
|
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
# include enabled server blocks from /etc/nginx/enabledSites/*.conf
|
|
|
|
include /etc/nginx/enabledSites/*.conf;
|
|
|
|
}
|