I want my same website to accessible from a subdirectory. For example, right now my website is
https://example.com
What I want is, that it should also be reachable using:
https://example.com/hi
That means each path that is accessible from https://example.com
should also be accessible from https://example.com/hi
. How could I do this. Here is what I tried in my server config.
location /hi {
proxy_pass https://example.com
}
Right now, if I try https://example.com/hi
, it gives out Bad Gateway
. What is it that I should be doing?
Instead of using
proxy_pass
did you try usingrewrite
?