我有2个Web应用程序和一个在服务器上运行的节点/快捷应用程序。将请求发送到asdf
时,基本应用https://asdf.com
在基本位置运行。还有一个名为help
的辅助Web应用程序,当您请求https://asdf.com/help
时运行,而代理服务器应用程序(无关紧要)则响应对https://asdf.com/proxy
的请求。
当我点击https://asdf.com
或https://asdf.com/proxy
时,一切都会按预期进行,并且我的网址保持不变。但是,当我点击https://asdf.com/help
时,我运行了help
网络应用程序,但我的URL显示了https://asdf.com
并且导航按预期进行了,但是如果刷新站点,我得到的是asdf
应用程序应当如此。
我有以下Nginx配置文件:
server {
ssl on;
listen 443 ssl;
server_name asdf.com;
ssl_certificate /etc/ssl/certs/asdf.com.crt;
ssl_certificate_key /etc/ssl/private/asdf.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
root /var/www/asdf;
location / {
try_files $uri $uri.html $uri/ /help/index.html;
}
location /help {
root /var/www/development/client;
}
location /proxy {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
add_header X-Frame-Options SAMEORIGIN;
add_header X-XSS-Protection 1;
add_header Content-Security-Policy "frame-ancestors 'self'";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
add_header X-Content-Type-Options "nosniff";
add_header Referrer-Policy 'strict-origin';
}
如何更改它,以便当我点击https://asdf.com/help
时我的URL不会改变?
谢谢!