Nginx-将单个URL映射到文件


15

我找不到如何将单个URL映射到单个静态文件的方法。我试过了:

location /feeds/seznam/ {
    alias /path/to/file/feed.xml;
}

但这不起作用(在日志中,我看到它会将index.html附加到路径中)。


回答了新的读者
user21904

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.