Authored by 梁志锋

nginx备份

... ... @@ -222,8 +222,3 @@
location =/brand/index/about{
return 301 https://$host$request_uri;
}
# product detail page 301 redirect to item use https
location ^~ /product/pro_ {
return 301 https://item.m.yohobuy.com$request_uri;
}
\ No newline at end of file
... ...
# idc old proxy
location =/invite.html {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 =/app.html {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 =/yohood.html {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /home/lottery {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /home/redenvelopes {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /home/orders/tickets {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /home/currency/ {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 = /home/orders/cancel {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /wechat {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /huodong {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /download {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /events {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /appactive {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /cart/success {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /shopping/success {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /shopping/pay/aliwap {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 = /shopping/pay/wechatwap {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /passport/syncsignin {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 = /product/index/search {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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 ^~ /share_ {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host m.yohobuy.com;
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";
}
# idc old proxy for login to write memcache and cookie (if need?)
location ^~ /Passport/session {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
proxy_pass http://yohobuy_idc;
proxy_set_header Host mapi.yohobuy.com;
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 =/product/new/index {
return 301 http://m.yohobuy.com/product/new;
}
#old idc
location =/download/appsem {
return 301 http://cdn.yoho.cn/huodong-web/appsem/appsem.html;
}
location =/app {
return 301 http://www.yoho.cn;
}
location =/help.html {
return 301 http://m.yohobuy.com/home/help;
}
location ^~ /trends_detail_ {
return 301 http://guang.m.yohobuy.com;
}
#location =/about {
# return 301 http://$host$request_uri;
# }
#location =/brand/index/about{
# return 301 http://$host$request_uri;
# }
... ...
#app show help page
location =/help/shareorder.html {
root /Data/PE/yohobuy_H5/assets;
expires 7d;
}
# product detail page 301 redirect to item use https
location ^~ /product/pro_ {
return 301 https://item.m.yohobuy.com$request_uri;
}
location ^~ /shopping/pay/aliwapreturn {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host m.yohobuy.com;
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 / {
proxy_redirect off;
proxy_pass http://yohobuy;
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";
}
\ No newline at end of file
... ...
... ... @@ -37,6 +37,15 @@ server
# proxy_set_header Accept-Encoding "gzip";
# }
location ^~ /coupon {
proxy_redirect off;
proxy_pass http://yohobuy;
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";
}
# others http 301 redirect https
location / {
return 301 https://m.yohobuy.com$request_uri;
... ... @@ -57,12 +66,12 @@ server
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
error_log /Data/logs/error_wap.yohobuy.com.log warn;
# https key
include vhosts/location/yohobuywap_httpskey.conf;
# old idc
include vhosts/location/yohobuywap_idc.conf;
# app
include vhosts/location/yohobuywap_app.conf;
# php
include vhosts/location/yohobuywap_php.conf;
# node
include vhosts/location/yohobuywap_node.conf;
# static file
... ... @@ -80,15 +89,6 @@ server
# return 301 http://$host$request_uri;
#}
location / {
proxy_redirect off;
proxy_pass http://yohobuy;
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";
}
}
server
... ...
server
{
listen 80;
server_name m.yohobuy.com nginx1.m.yohobuy.com;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
error_log /Data/logs/error_wap.yohobuy.com.log warn;
# app
include vhosts/location/yohobuywap_app.conf;
#for wechat pay
location ^~ /home/orders/pay {
proxy_redirect off;
proxy_pass http://yohobuy;
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 ^~ /shopping/pay/wechatwapapi {
proxy_redirect off;
proxy_pass http://yohobuy;
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 =/shopping/pay/aliwapreturn {
# proxy_redirect off;
# proxy_pass http://yohobuy_idc;
# 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 ^~ /coupon {
proxy_redirect off;
proxy_pass http://yohobuy;
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";
}
# others http 301 redirect https
location / {
return 301 https://m.yohobuy.com$request_uri;
}
}
server
{
listen 443;
server_name m.yohobuy.com;
#ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem;
#ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key;
ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem;
ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key;
root /Data/PE/yohobuy_H5/yohobuy/m.yohobuy.com/public;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
error_log /Data/logs/error_wap.yohobuy.com.log warn;
# https key
#include vhosts/location/yohobuywap_httpskey.conf;
# old idc
include vhosts/location/yohobuywap_idc.conf;
include vhosts/location/yohobuywap_idc_nohttps.conf;
# app
include vhosts/location/yohobuywap_app.conf;
# php
include vhosts/location/yohobuywap_php.conf;
# node
include vhosts/location/yohobuywap_node.conf;
# static file
... ... @@ -41,16 +96,16 @@ server
proxy_set_header Accept-Encoding "gzip";
}
location =/shopping/pay/aliwapreturn {
proxy_redirect off;
proxy_pass http://yohobuy_idc;
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 =/shopping/pay/aliwapreturn {
# proxy_redirect off;
# proxy_pass http://yohobuy_idc;
# 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 / {
location ^~ /coupon {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host $host;
... ... @@ -66,11 +121,25 @@ server
listen 80;
server_name *.m.yohobuy.com;
#ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
#ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
error_log /Data/logs/error_wap.yohobuy.com.log warn;
# others http 301 redirect https
location / {
return 301 https://$host$request_uri;
}
}
server
{
listen 443;
server_name *.m.yohobuy.com;
ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key;
# https key
#include vhosts/location/yohobuywap_httpskey.conf;
include vhosts/location/yohobuywap_httpskey.conf;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
... ... @@ -132,14 +201,14 @@ server
server
{
listen 80;
listen 443;
server_name analytics.m.yohobuy.com;
#ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
#ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key;
ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key;
# https key
#include vhosts/location/yohobuywap_httpskey.conf;
include vhosts/location/yohobuywap_httpskey.conf;
location / {
proxy_redirect off;
... ... @@ -151,35 +220,3 @@ server
}
}
\ No newline at end of file
server
{
listen 443;
server_name m.yohobuy.com;
ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem;
ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key;
# https key
include vhosts/location/yohobuywap_httpskey.conf;
location / {
return 301 http://$host$request_uri;
}
}
server
{
listen 443;
server_name *.m.yohobuy.com;
ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key;
# https key
include vhosts/location/yohobuywap_httpskey.conf;
location / {
return 301 http://$host$request_uri;
}
}
\ No newline at end of file
... ...