2023-02-19 00:32:30 +08:00
|
|
|
# include nginx-rebuild.conf;
|
2021-04-08 16:54:53 +08:00
|
|
|
server {
|
2023-11-11 11:30:50 +08:00
|
|
|
server_name YOUR_IP_OR_DOMAIN;
|
|
|
|
listen 80;
|
2021-06-08 17:53:02 +08:00
|
|
|
# HTTPS
|
2023-11-11 11:30:50 +08:00
|
|
|
#listen 443 ssl http2;
|
|
|
|
#ssl_certificate /path/to/ssl.crt;
|
|
|
|
#ssl_certificate_key /path/to/ssl.key;
|
2021-06-08 17:53:02 +08:00
|
|
|
# PROXY
|
2023-11-11 11:30:50 +08:00
|
|
|
proxy_redirect http:// $scheme://;
|
|
|
|
proxy_set_header Host $host:$server_port;
|
|
|
|
proxy_set_header Remote-Host $remote_addr;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_connect_timeout 90;
|
|
|
|
proxy_send_timeout 300;
|
|
|
|
proxy_read_timeout 300;
|
|
|
|
proxy_buffer_size 8k;
|
|
|
|
proxy_buffers 4 32k;
|
|
|
|
proxy_busy_buffers_size 64k;
|
|
|
|
proxy_temp_file_write_size 64k;
|
|
|
|
client_max_body_size 200m; # Max of file upload
|
|
|
|
client_body_buffer_size 128k;
|
|
|
|
# PASS
|
2021-06-08 17:53:02 +08:00
|
|
|
location / {
|
2023-11-11 11:30:50 +08:00
|
|
|
proxy_pass http://127.0.0.1:18080;
|
|
|
|
etag on;
|
2021-06-08 17:53:02 +08:00
|
|
|
}
|
2021-12-13 17:03:09 +08:00
|
|
|
location /assets {
|
2023-11-11 11:30:50 +08:00
|
|
|
proxy_pass http://127.0.0.1:18080/assets;
|
|
|
|
expires 90d;
|
2021-06-08 17:53:02 +08:00
|
|
|
}
|
2021-06-08 13:52:39 +08:00
|
|
|
}
|