This commit is contained in:
24
nginx.conf
24
nginx.conf
@@ -38,13 +38,29 @@ server {
|
||||
server {
|
||||
listen 8000;
|
||||
server_name rustfs.liubeiting.cn;
|
||||
# Allow special characters in headers
|
||||
ignore_invalid_headers off;
|
||||
# Allow any size file to be uploaded.
|
||||
# Set to a value such as 1000m; to restrict file size to a specific value
|
||||
client_max_body_size 0;
|
||||
# Disable buffering
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
location / {
|
||||
proxy_pass http://192.168.1.100:9004;
|
||||
proxy_redirect off;#以下是一些反向代理的配置可删除
|
||||
proxy_pass_header Set-Cookie; # cookie
|
||||
proxy_set_header Host $host; # 主机名
|
||||
proxy_set_header X-Real-Ip $remote_addr;# 真实 IP
|
||||
proxy_set_header X-Forwarded-For $remote_addr; # 表示 HTTP 请求端真实 IP
|
||||
proxy_set_header Host $http_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;
|
||||
proxy_connect_timeout 300;
|
||||
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
chunked_transfer_encoding off;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +68,7 @@ server {
|
||||
server {
|
||||
listen 8000;
|
||||
server_name git.liubeiting.cn;
|
||||
client_max_body_size 100m;
|
||||
location / {
|
||||
proxy_pass http://192.168.1.100:3000;
|
||||
proxy_redirect off;#以下是一些反向代理的配置可删除
|
||||
@@ -59,7 +76,6 @@ server {
|
||||
proxy_set_header Host $host; # 主机名
|
||||
proxy_set_header X-Real-Ip $remote_addr;# 真实 IP
|
||||
proxy_set_header X-Forwarded-For $remote_addr; # 表示 HTTP 请求端真实 IP
|
||||
client_max_body_size 100m;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user