【发布时间】:2022-01-15 01:13:00
【问题描述】:
我在 Strato 托管我的域并永久重定向到我的 linux 服务器。 这很好,但我想更改 URL,以便它们不是我服务器的 IP,而是原始域的名称。
所以我调用例如 www.page.de 并将其重定向到 myip/outfitcreator。但是我想要www.page.de/outfitcreator而不是myip。
有什么解决办法吗?
这是我的 nginx 文件
server {
listen 80;
server_name xx.xx.xxx.xxx;
location / {
root /var/www/kioskJPE/html;
index index.html;
}
location /upload {
alias /var/www/fileUpload/html/upload;
}
location /downloadfiles{
alias /var/www/fileUpload/html;
}
location /uploadFiles {
proxy_pass http://localhost:8080;
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;
}
location /outfitcreator {
alias /var/www/outfitcreator/html;
}
}
非常感谢!
【问题讨论】: