前端配置
server_name wfyskins.com;
server {
listen 7000;
server_name 前端pc.com;
access_log logs/dev-access.log main;
root /data/local/frontend;
index index.html index.htm;
location ~ /web/v2/([^/.]*)/ {
#default_type text/html;
#return 200 "$1";
root /data/local/frontend/usea/pc;
try_files $uri $uri/ /$1/index.html last;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}
location ~ /pda/v2/([^/.]*)/ {
root /data/local/frontend/usea/pda;
try_files $uri $uri/ /$1/index.html last;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}
location @router {
rewrite ^.*$ /index.html last;
}
location /config.js {
rewrite .* /dev.config.js;
}
location ~ /\.ht {
deny all;
}
location ~ /snapshot.info {
deny all;
}
}
location ~ /web/ {
#default_type text/html;
#return 200 "$1";
root /data/local/frontend/usea/pc;
try_files $uri $uri/ /index.html last;
}
server {
listen 9001;
server_name ls.com;
#server_name localhost;
#access_log logs/dev-overseas-usea-pc.log main;
root /data/local/frontend/ls;
index index.html index.htm;
location / {
try_files $uri $uri/ @router;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}
location /web{
proxy_pass http://localhost:9002/web/;
}
location @router {
rewrite ^.*$ /index.html last;
}
location /config.js {
# 基于域名返回指定环境配置
rewrite .* /dev.config.js;
#return 301 /dev.config.js;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
location ~ /snapshot.info {
deny all;
}
}

location /itnpay{
proxy_pass https://xnetpay.net/itnpay/;
}
```https://xnetpay.net