82 lines
2.4 KiB
Nginx Configuration File
82 lines
2.4 KiB
Nginx Configuration File
user www-data;
|
|
worker_processes auto;
|
|
|
|
#error_log /var/log/nginx_error.log info; # [ debug | info | notice | warn | error | crit ]
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
use epoll; # use [ kqueue | rtsig | epoll | /dev/poll | select | poll ]
|
|
}
|
|
|
|
http {
|
|
|
|
#----------------------------------------
|
|
# Logging
|
|
#----------------------------------------
|
|
|
|
|
|
# REFERENCE 1
|
|
#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/http_access.log main;
|
|
|
|
# REFERENCE 2
|
|
#log_format main '$remote_addr - $host [$time_local] "$request" '
|
|
# '$status $body_bytes_sent "$http_referer" '
|
|
# '"$http_user_agent" "$http_x_forwarded_for"'
|
|
# 'rt=$request_time ut=$upstream_response_time '
|
|
# 'cs=$upstream_cache_status';
|
|
|
|
#log_format cache '$remote_addr - $host [$time_local] "$request" $status '
|
|
# '$body_bytes_sent "$http_referer" '
|
|
# 'rt=$request_time ut=$upstream_response_time '
|
|
# 'cs=$upstream_cache_status';
|
|
|
|
#access_log /var/log/nginx/http_access.log main;
|
|
#error_log /var/log/nginx/http_error.log error;
|
|
|
|
#----------------------------------------
|
|
# Basic Settings
|
|
#----------------------------------------
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
#----------------------------------------
|
|
# Common Limits
|
|
#----------------------------------------
|
|
|
|
client_max_body_size 1G; # Max upload size
|
|
|
|
#----------------------------------------
|
|
# GZip
|
|
#----------------------------------------
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_comp_level 4;
|
|
gzip_min_length 1000;
|
|
gzip_buffers 4 8k;
|
|
gzip_types text/plain;
|
|
|
|
#----------------------------------------
|
|
# Cache
|
|
#----------------------------------------
|
|
|
|
proxy_cache_valid 1m;
|
|
|
|
#----------------------------------------
|
|
# Virtual Hosts
|
|
#----------------------------------------
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
} |