+1
Completat
reverse proxy to example.com/ajenti
Hello there! I copied the reverse proxy code for nginx from your documentation and was scratching my head why it was not working in my environment.
server { server_name fallthrough; client_max_body_size 20m; listen 80; location /ajenti { rewrite /ajenti/(.*) /$1 break; proxy_pass http://127.0.0.1:8000; proxy_redirect / /ajenti/; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
to make a long story short, it turned out that the way it is written, one has to always add a trailing slash to uri to make it work. (ie., //example.com/ajenti/) I ended up adding another rewrite directive right before the existing rewrite, so "//example.com/ajenti" is properly handled.
rewrite (/ajenti)$ / break ; rewrite /ajenti/(.*) /$1 break;I think I can smart these up into one liner but my brain is mash now :)
Customer support service by UserEcho
As I suspected, my brain was not working last night.
Rewrite! previous one even matches /ajentibrahbrah
Thanks! I will add this to the docs.