0
有沒有辦法在nginx中指定一個變量? 我想有www.example.com/dm/123如何在nginx路徑中指定一個變量?
和123將被傳遞到proxy_pass爲ID = 123,這裏是一個不完整的nginx的配置:
location /dm {
proxy_read_timeout 300s;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:3000/details?id=VARIABLE;
# index index.html index.htm;
proxy_redirect off;
}