...
|
...
|
@@ -19,16 +19,7 @@ server |
|
|
# node
|
|
|
include vhosts/location/yohobuypc_node.conf;
|
|
|
|
|
|
|
|
|
location = /index.html {
|
|
|
return 301 http://www.yohobuy.com/;
|
|
|
}
|
|
|
|
|
|
location ^~ /resource/getbanner {
|
|
|
rewrite /resource/getbanner(.*)$ https://www.yohobuy.com/common/getbanner$1 permanent;
|
|
|
}
|
|
|
|
|
|
location ~* /special_(\d+)_(.*)\.html$ {
|
|
|
location ~* /special_(\d+)_(.*)\.html$ {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://yohobuy-old-www;
|
|
|
proxy_set_header Host $host;
|
...
|
...
|
@@ -46,8 +37,25 @@ server |
|
|
proxy_set_header Accept-Encoding "gzip";
|
|
|
}
|
|
|
|
|
|
location ^~ /home/returns {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://yohobuy-pc;
|
|
|
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 Accept-Encoding "gzip";
|
|
|
}
|
|
|
|
|
|
location = /index.html {
|
|
|
return 301 http://www.yohobuy.com/;
|
|
|
}
|
|
|
|
|
|
location ^~ /resource/getbanner {
|
|
|
rewrite /resource/getbanner(.*)$ https://www.yohobuy.com/common/getbanner$1 permanent;
|
|
|
}
|
|
|
|
|
|
#https flag, 1 means HTTPS, 0 means HTTP
|
|
|
set $httpsFlag 1;
|
|
|
set $httpsFlag 0;
|
|
|
|
|
|
location / {
|
|
|
if ($httpsFlag = 1) {
|
...
|
...
|
@@ -66,7 +74,7 @@ server |
|
|
|
|
|
server
|
|
|
{
|
|
|
listen 80;
|
|
|
listen 80;
|
|
|
listen 443 ssl;
|
|
|
ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem;
|
|
|
ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key;
|
...
|
...
|
@@ -122,8 +130,12 @@ server |
|
|
return 301 http://$host$request_uri;
|
|
|
}
|
|
|
|
|
|
location ^~ /home/returns {
|
|
|
return 301 http://$host$request_uri;
|
|
|
}
|
|
|
|
|
|
location = /index.html {
|
|
|
return 301 http://www.yohobuy.com/;
|
|
|
return 301 http://www.yohobuy.com/;
|
|
|
}
|
|
|
|
|
|
location ^~ /resource/getbanner {
|
...
|
...
|
@@ -131,7 +143,7 @@ server |
|
|
}
|
|
|
|
|
|
#https flag, 1 means HTTPS, 0 means HTTP
|
|
|
set $httpsFlag 1;
|
|
|
set $httpsFlag 0;
|
|
|
|
|
|
location / {
|
|
|
if ($httpsFlag = 0) {
|
...
|
...
|
@@ -234,21 +246,22 @@ server |
|
|
include vhosts/location/yohobuypc_static.conf;
|
|
|
}
|
|
|
|
|
|
#server
|
|
|
#{
|
|
|
# listen 80;
|
|
|
# listen 443 ssl;
|
|
|
#
|
|
|
# server_name yohobuy.com;
|
|
|
# ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem;
|
|
|
# ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key;
|
|
|
#
|
|
|
# # access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi;
|
|
|
# error_log /Data/logs/error_pc.yohobuy.com.log warn;
|
|
|
# location = / {
|
|
|
# return 301 https://www.yohobuy.com/;
|
|
|
# }
|
|
|
#}
|
|
|
server
|
|
|
{
|
|
|
listen 80;
|
|
|
#listen 443 ssl;
|
|
|
|
|
|
server_name yohobuy.com;
|
|
|
#ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem;
|
|
|
#ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key;
|
|
|
|
|
|
# access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi;
|
|
|
error_log /Data/logs/error_pc.yohobuy.com.log warn;
|
|
|
location = / {
|
|
|
return 301 http://www.yohobuy.com/;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
server
|
|
|
{
|
...
|
...
|
@@ -268,6 +281,7 @@ server |
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
proxy_set_header Accept-Encoding "gzip";
|
|
|
proxy_set_header http_referer $http_referer;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -283,6 +297,7 @@ server |
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
proxy_set_header Accept-Encoding "gzip";
|
|
|
proxy_set_header http_referer $http_referer;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|