39 lines
1.4 KiB
Nginx Configuration File
Raw Permalink Normal View History

2025-03-19 17:38:46 +08:00
user root;
worker_processes 4;
error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
#pid logs/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"';
log_format main-upstream '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" forword-for: "$http_x_forwarded_for" '
'upstream_addr: $upstream_addr upstream_status: $upstream_status $upstream_response_time';
error_log /root/logs/error.log ;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 5;
gzip_types application/x-javascript text/css application/octet-strea image/png audio/mpeg applic
ation/javascript application/json;
include /root/conf.d/*.conf;
access_log /root/disk2/logs/main.log main ;
server {
listen 80 default_server;
server_name _;
location / {
return 403;
}
}
}