| 1 | user nginx;
|
|---|
| 2 | worker_processes 1;
|
|---|
| 3 | worker_rlimit_nofile 2048;
|
|---|
| 4 |
|
|---|
| 5 | error_log /var/log/nginx/error.log warn;
|
|---|
| 6 | pid /var/run/nginx.pid;
|
|---|
| 7 |
|
|---|
| 8 | ## Load dynamic modules. See /usr/share/nginx/README.dynamic.
|
|---|
| 9 | #include /usr/share/nginx/modules/*.conf;
|
|---|
| 10 |
|
|---|
| 11 | events {
|
|---|
| 12 | worker_connections 1024;
|
|---|
| 13 | multi_accept on;
|
|---|
| 14 | use epoll;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | http {
|
|---|
| 18 | include /etc/nginx/mime.types;
|
|---|
| 19 | default_type application/octet-stream;
|
|---|
| 20 | client_max_body_size 100m;
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|---|
| 24 | '$status $body_bytes_sent "$http_referer" '
|
|---|
| 25 | '"$http_user_agent" "$http_x_forwarded_for"';
|
|---|
| 26 |
|
|---|
| 27 | access_log /var/log/nginx/access.log main;
|
|---|
| 28 |
|
|---|
| 29 | sendfile on;
|
|---|
| 30 | #tcp_nopush on;
|
|---|
| 31 |
|
|---|
| 32 | keepalive_timeout 65;
|
|---|
| 33 |
|
|---|
| 34 | # Proxy cache and temp configuration.
|
|---|
| 35 | proxy_cache_path /var/www/nginx_cache levels=1:2
|
|---|
| 36 | keys_zone=main:10m
|
|---|
| 37 | max_size=1g inactive=30m;
|
|---|
| 38 | proxy_temp_path /var/www/nginx_tmp;
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 | # Load Cloudflare IPv4 IPv6 address list
|
|---|
| 42 | include /etc/nginx/cloudflare_ips;
|
|---|
| 43 |
|
|---|
| 44 | # Load modular configuration files from the /etc/nginx/conf.d directory.
|
|---|
| 45 | include /etc/nginx/conf.d/*.conf;
|
|---|
| 46 | }
|
|---|