17

I'm unable to find how I can map a single URL to a single static file. I tried:

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

but this does not work (in logs I see that it appends index.html to the path).

1
15

Try this instead:

location /feeds/seznam/ {
    rewrite ^/feeds/seznam/$ /path/to/file/feed.xml;
}

References

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.