面临 nginx URL 重写此 URL https://webserver.com 到 https://webserver.com/access 的问题

面临 nginx URL 重写此 URL https://webserver.com 到 https://webserver.com/access 的问题

我在 nginx URL 重写此 URL 时遇到问题https://webserver.com进入https://webserver.com/access. 我对 nginx 还不熟悉,只有一些基础知识。

当前 nginx 配置如下

upstream app1 {
    server 192.168.250.62:443;
}
server {
    listen 443 ssl;
    server_name app1.webserver.com;
    ssl on;
    ssl_certificate /etc/nginx/ssl/cert.crt;
    ssl_certificate_key /etc/nginx/ssl/cert.key;
    location / {
        proxy_pass https://app1;
    }
    location / {
        return 301 /access;
    }
}

相关内容