Authored by 梁志锋

备份nginx的修改

# app api
#app api
location =/appembed {
default_type application/json;
return 200 '{"code":200,"message":"app embed","data":{"open":"N","url":"http://m.yohobuy.com"}}';
... ... @@ -29,4 +29,4 @@
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
}
... ...
... ... @@ -5,4 +5,4 @@
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:DES-CBC3-SHA";
ssl_session_tickets off;
ssl_session_cache shared:SSL:10m;
\ No newline at end of file
ssl_session_cache shared:SSL:10m;
... ...
# idc old proxy
#idc old proxy
location =/invite.html {
access_log /Data/logs/access.m.yohobuy.com.log fenxi;
proxy_redirect off;
... ... @@ -194,7 +194,7 @@
}
location =/product/new/index {
return 301 https://m.yohobuy.com/product/new;
return 301 http://m.yohobuy.com/product/new;
}
... ... @@ -208,17 +208,22 @@
}
location =/help.html {
return 301 https://m.yohobuy.com/home/help;
return 301 http://m.yohobuy.com/home/help;
}
location ^~ /trends_detail_ {
return 301 https://guang.m.yohobuy.com;
return 301 http://guang.m.yohobuy.com;
}
location =/about {
return 301 https://$host$request_uri;
}
#location =/about {
# return 301 http://$host$request_uri;
# }
#location =/brand/index/about{
# return 301 http://$host$request_uri;
# }
location ^~ /product/pro_ {
return 301 http://item.m.yohobuy.com$request_uri;
}
location =/brand/index/about{
return 301 https://$host$request_uri;
}
... ...
location ^~ /passport/login/wechat/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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 ^~ /activity {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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 ^~ /passport/login/wechat/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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/index {
return 301 /activity/coupon?$query_string;
}
location ^~ /activity {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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 ^~ /product/sale/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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 ^~ /guang/star/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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 ^~ /product/sale/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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 ^~ /guang/star/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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 ^~ /product/outlet/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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
location ^~ /product/outlet/ {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
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";
}
... ...
# wechat pay
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";
}
#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 ^~ /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/aliwapreturn {
location ^~ /shopping/pay/wechatwapapi {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host m.yohobuy.com;
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;
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
}
... ...
# static file
#static file
location =/favicon.ico {
expires 7d;
}
... ... @@ -23,8 +23,7 @@
expires 7d;
}
##百度站长的校验文件, 百度站长账号feng322169 密码yoho9646
location = /baidu_verify_bXX90VTyvs.html {
root /Data/PE/yohobuy_H5/assets;
expires 7d;
}
\ No newline at end of file
root /Data/PE/yohobuy_H5/assets;
expires 7d;
}
... ...
... ... @@ -6,53 +6,34 @@ server
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";
# }
# 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
include vhosts/location/yohobuywap_static.conf;
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";
}
#https flag, 1 means HTTPS, 0 means HTTP
set $httpsFlag 0;
# others http 301 redirect https
location / {
return 301 https://m.yohobuy.com$request_uri;
}
location / {
if ($httpsFlag = 1) {
return 301 https://$host$request_uri;
}
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
{
listen 443;
... ... @@ -61,6 +42,9 @@ server
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;
root /Data/PE/yohobuy_H5/yohobuy/m.yohobuy.com/public;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
... ... @@ -69,26 +53,60 @@ server
# 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;
include vhosts/location/yohobuywap_app.conf;
# php
include vhosts/location/yohobuywap_php.conf;
# node
include vhosts/location/yohobuywap_node.conf;
# static file
include vhosts/location/yohobuywap_static.conf;
#https flag, 1 means HTTPS, 0 means HTTP
set $httpsFlag 0;
location / {
if ($httpsFlag = 0) {
return 301 http://$host$request_uri;
}
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
{
listen 80;
server_name guang.m.yohobuy.com;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
error_log /Data/logs/error_wap.yohobuy.com.log warn;
# static file
include vhosts/location/yohobuywap_static.conf;
#for we chat pay
location =/home/orders/pay{
return 301 http://$host$request_uri;
}
location =/shopping/pay/wechatwapapi {
return 301 http://$host$request_uri;
# guang rss
location ^~ /rss {
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 {
# 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
... ... @@ -99,9 +117,22 @@ server
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;
# static file
include vhosts/location/yohobuywap_static.conf;
#https flag, 1 means HTTPS, 0 means HTTP
set $httpsFlag 0;
location / {
if ($httpsFlag = 1) {
return 301 https://$host$request_uri;
}
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";
}
}
... ... @@ -116,7 +147,6 @@ server
# https key
include vhosts/location/yohobuywap_httpskey.conf;
access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
error_log /Data/logs/error_wap.yohobuy.com.log warn;
... ... @@ -126,35 +156,40 @@ server
include vhosts/location/yohobuywap_static.conf;
# idc old proxy. while 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";
}
# guang rss
location ^~ /rss {
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 ^~ /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";
}
# guang rss
location ^~ /rss {
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 / {
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";
#https flag, 1 means HTTPS, 0 means HTTP
set $httpsFlag 0;
location / {
if ($httpsFlag = 0) {
return 301 http://$host$request_uri;
}
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
{
... ... @@ -174,9 +209,9 @@ server
}
}
server
server
{
listen 443;
listen 443;
server_name analytics.m.yohobuy.com;
ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
... ... @@ -193,5 +228,26 @@ server
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}
server
{
listen 80;
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;
# https key
# include vhosts/location/yohobuywap_httpskey.conf;
location / {
proxy_redirect off;
proxy_pass http://yohobuy_analytics;
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
... ...
... ... @@ -67,7 +67,7 @@ server
error_log /Data/logs/error_wap.yohobuy.com.log warn;
# old idc
include vhosts/location/yohobuywap_idc_nohttps.conf;
include vhosts/location/yohobuywap_idc.conf;
# app
include vhosts/location/yohobuywap_app.conf;
# php
... ... @@ -77,42 +77,17 @@ server
# static file
include vhosts/location/yohobuywap_static.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";
}
#for we chat pay
location =/home/orders/pay{
return 301 http://$host$request_uri;
}
location =/shopping/pay/wechatwapapi {
return 301 http://$host$request_uri;
}
#location =/shopping/pay/aliwapreturn {
# return 301 http://$host$request_uri;
#}
}
... ...