sudo nginx -t
sudo nginx -s reload
server{
listen 80;
server_name jlw.???.com;
location /admin/ {
root /data/static/jlw-mall/;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location / {
root /data/static/jlw-mall/web/;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
#location ~ \.(js|css|png|gif|jpg|JPG|jpeg|JPEG|html|otf|eot|svg|ttf|woff|json|apk|pdf|ppt|pptx|doc|docx|xls|xlsx|rar|zip)$ {
# root /mydata/static/upload;
# index index.html index.htm;
#}
}
server{
listen 80;
server_name www.51xfj.xyz;
location ~ .*\.(js|css|png|jpg)$ {
root /mydata/upload/;
if (-f $request_filename) {
expires 1d;
break;
}
}
location / {
root /mydata/static/xfj;
index index.html index.htm;
}
#location /upload/ {
# root /mydata/upload/;
# index index.html index.htm;
#}
}