location /download 和 location = /download

唐茂实
2023-12-01
server{
        listen      2443;
        server_name  192.168.137.3;
        server_name_in_redirect on;
        ssl on;
        #从腾讯云获取到的第一个文件的全路径
         ssl_certificate /etc/ssl/server.pem;
         ssl_certificate_key /etc/ssl/server.key;
          location = /download
                 {
                  alias  /usr/local/nginx/html/;
 }
        }
		
https://192.168.137.2:2443/download/index.html 无法访问 


server{
        listen      2443;
        server_name  192.168.137.3;
        server_name_in_redirect on;
        ssl on;
        #从腾讯云获取到的第一个文件的全路径
         ssl_certificate /etc/ssl/server.pem;
         ssl_certificate_key /etc/ssl/server.key;
          location  /download
                 {
                  alias  /usr/local/nginx/html/;
 }
        }

https://192.168.137.2:2443/download/  可以访问 
https://192.168.137.2:2443/download/index.html 可以访问

 

 类似资料: