server {
        listen       80;
        server_name  www.xxx.cn;
    
     #静态页面
     #匹配首页,url:www.xxx.cn index index.html; root
/usr/local/nginx/html/admin/;
     #匹配样式 location
~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css|font|ttf)$ { root /usr/local/nginx/html/admin/; }
#动态页面
     #匹配其他URL(除了首页和样式之外的url)
     #[a-z]+: 多个a-z字符。 location
~* /[a-z]+/ { #root /usr/local/nginx/html/admin/; proxy_pass http://tadmin_shujuzhihui; # try_files $uri/ /index.html; } error_page 502 = /404.html; }

 

相关文章:

  • 2021-05-26
  • 2021-11-16
猜你喜欢
  • 2021-06-19
  • 2022-01-06
  • 2021-12-15
  • 2021-12-27
  • 2021-06-24
  • 2021-09-30
相关资源
相似解决方案