server
{
listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;
server_name www.a.com a.com;
index index.html index.htm index.php;
root /home/wwwroot/ecs1;
#error_page 404 /404.html;
# return 301 https://www.a.com$request_uri;
include enable-php-pathinfo.conf;
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ ^/shopadmin {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
location /h5 {
try_files $uri $uri/ /h5/index.html;
}
location /nginx_status
{
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
access_log /home/wwwlogs/a.log;
}
#server
# {
# listen 443;
# ssl on;
# ssl_certificate cert/5021234_www.a.com.pem;
# ssl_certificate_key cert/5021234_www.xiongshilogistics.com.key;
# ssl_session_timeout 5m;
# ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_prefer_server_ciphers on;
# server_name www.xiongshilogistics.com a.com;
# index index.html index.htm index.php;
# root /home/wwwroot/ecs1;
# #error_page 404 /404.html;
# include enable-php-pathinfo.conf;
# include shopex.conf;
# location /nginx_status
# {
# stub_status on;
# access_log off;
# }
# location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
# {
# expires 30d;
# }
# location ~ .*\.(js|css)?$
# {
# expires 12h;
# }
# location ~ /.well-known {
# allow all;
# }
# access_log /home/wwwlogs/a.log;
#}
shopex-485,主站和手机版waptouch伪静态共存
http://www.a.com/
http://www.a.com/waptouch
location /waptouch/ { if (!-e $request_filename) { rewrite ^/waptouch/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /waptouch/index.php?$1 last; } } location / { if (!-e $request_filename) { rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last; } }