u.twoha.cc/nginx.conf

34 lines
1,005 B
Nginx Configuration File
Raw Normal View History

2024-09-18 23:10:48 -04:00
pid /tmp/pid.pid;
daemon off;
events {}
http {
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 /dev/stdout main;
server {
listen 8080;
server_name localhost;
root /tmp/2h;
location / {
try_files $uri $uri.html $uri/ =404;
autoindex on;
types {
2024-09-19 22:17:42 -04:00
text/html html;
2024-09-18 23:10:48 -04:00
text/css css;
application/javascript js;
2024-09-19 22:17:42 -04:00
image/x-icon ico;
2024-09-18 23:10:48 -04:00
}
}
2024-09-19 22:17:42 -04:00
location /_/ {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
2024-09-18 23:10:48 -04:00
}
}