trailing slash at end URL with nginx as a reverse proxy for multiple website

Nguyen Hai Nam nam.nh at
Sun Nov 20 08:11:27 UTC 2011


I'm running OpenIndiana 151a server then now I'd like to build the web
service with nginx. Briefly, my scenario is: one central server installed a
few website in virtual machines, and there is a different real machine that
stores static contents. I want nginx in central server will be the reverse
proxy (get idea from

For example, if someone open website, it will be redirected to, and if other go to it will be redirected to, etc ...

server {
    listen       80;

    location / {
        proxy_redirect     off;
        server_name_in_redirect off;

Nginx works fine, but I don't know how to rewrite/redirect the URL looks
like: becomes

If someone open the link nginx can't serve it then
return the error message that says ""

If you have any advice, please tell. It's highly appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list