mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
76 lines
1.7 KiB
Nginx Configuration File
76 lines
1.7 KiB
Nginx Configuration File
# ubuntu specific
|
|
user nginx;
|
|
pid /var/run/nginx.pid;
|
|
|
|
# universal
|
|
|
|
worker_processes auto;
|
|
worker_rlimit_nofile 100000;
|
|
|
|
error_log /data/nginx/logs/nginx-error.log warn;
|
|
|
|
events {
|
|
worker_connections 8000;
|
|
}
|
|
|
|
http {
|
|
open_file_cache max=200000 inactive=20s;
|
|
open_file_cache_valid 30s;
|
|
open_file_cache_min_uses 2;
|
|
open_file_cache_errors on;
|
|
|
|
server_tokens off;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
charset utf-8;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
|
|
reset_timedout_connection on;
|
|
client_body_timeout 10;
|
|
send_timeout 2;
|
|
keepalive_timeout 30;
|
|
keepalive_requests 100000;
|
|
|
|
max_ranges 0;
|
|
|
|
gzip on;
|
|
gzip_comp_level 1;
|
|
gzip_min_length 256;
|
|
gzip_proxied any;
|
|
gzip_vary on;
|
|
|
|
gzip_types
|
|
text/plain;
|
|
|
|
log_format access_json '{'
|
|
'"time": "$time_iso8601", '
|
|
'"msec": "$msec", '
|
|
'"status": $status, '
|
|
'"request": "$request", '
|
|
'"request_method": "$request_method", '
|
|
'"request_time": $request_time, '
|
|
'"body_bytes_sent": $body_bytes_sent, '
|
|
'"remote_addr": "$remote_addr", '
|
|
'"remote_user": "$remote_user", '
|
|
'"http_referrer": "$http_referer", '
|
|
'"http_x_forwarded_for": "$http_x_forwarded_for", '
|
|
'"http_user_agent": "$http_user_agent", '
|
|
'"host": "$host", '
|
|
'"uri": "$uri", '
|
|
'"http_cf_connecting_ip": "$http_cf_connecting_ip", '
|
|
'"http_cf_ray": "$http_cf_ray", '
|
|
'"http_cf_ipcountry": "$http_cf_ipcountry", '
|
|
'"scheme": "$scheme", '
|
|
'"http_host": "$http_host"'
|
|
'}';
|
|
|
|
access_log /data/nginx/logs/nginx-access.log access_json;
|
|
|
|
include /data/nginx/config/*;
|
|
include /data/nginx/sites/*;
|
|
}
|