Pro版 v2.0 +版本nignx服務器客服端配置說明
1.復制以下內容
#PROXY-START/
location ~* \.(php|jsp|cgi|asp|aspx)$
{
proxy_pass http://127.0.0.1:20199;
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 REMOTE-HOST $remote_addr;
}
location /
{
if (!-e $request_filename) {
proxy_pass http://127.0.0.1:20199;
}
proxy_http_version 1.1;
proxy_read_timeout 360s;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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 REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
add_header Cache-Control no-cache;
expires 12h;
}
#PROXY-END/
2.點擊剛添加的反向代理,后方的配置文件
3.替換配置文件 (全部配置)并修改端口號
替換后,點擊保存
Pro版nignx反向代理設置完畢。
多店版 v2.0 +版本nignx服務器客服端配置說明
注意??多店>=2.4.0版本,為了不和單店端口沖突,反向代理默認端口改為:20699
注意??多店>=2.4.0版本,為了不和單店端口沖突,反向代理默認端口改為:20699
注意??多店>=2.4.0版本,為了不和單店端口沖突,反向代理默認端口改為:20699
1.復制以下內容,如果>=2.4.0版本,需要根據第三步修改端口為20699
#PROXY-START/
location ~* \.(php|jsp|cgi|asp|aspx)$
{
proxy_pass http://127.0.0.1:20199;
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 REMOTE-HOST $remote_addr;
}
location /
{
if (!-e $request_filename) {
proxy_pass http://127.0.0.1:20199;
}
proxy_http_version 1.1;
proxy_read_timeout 360s;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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 REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
add_header Cache-Control no-cache;
expires 12h;
}
#PROXY-END/
2.點擊剛添加的反向代理,后方的配置文件
3.替換配置文件 (全部配置)并修改端口號
替換后,點擊保存
多店版nignx反向代理設置完畢。