youxiu326

 

  • 编辑 nginx.conf
        server {
                listen 80;
                server_name file.youxiu326.xin;
                location /image/ {    #访问 file.youxiu326.xin/image/*  则访问到 /java/static/image/*
                    root /java/static/;
                    autoindex on;
                }
                location /file/ {    #访问 file.youxiu326.xin/file/*  则访问到 /java/static/file/*  
                    root /java/static/;
                    autoindex on;
                }
        }

  

  • 重启nginx
[root@lihui static]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@lihui static]# nginx -s reload

  

 

分类:

技术点:

相关文章:

  • 2021-09-03
  • 2022-02-04
  • 2021-12-19
  • 2022-01-21
  • 2021-11-30
  • 2021-11-30
  • 2021-12-06
猜你喜欢
  • 2022-01-08
  • 2021-10-26
  • 2021-12-03
  • 2021-11-30
相关资源
相似解决方案