Example.com.conf reverse proxy

This is more of an Nginx question, but I’ve been working hard to get this far, so hopefully someone will have mercy on me.

I have 2 working sites, each with their own /home/user-data/www/example.com

I have one custom config /home/user-data/www/example.com.conf

location /staticman {
        proxy_pass         http://localhost:1111;

I tried a bunch of variations, but that’s the short of it… no matter what I do:

Cannot GET /staticman

I verify config with sudo nginx -t

I reload miab and nginx: sudo ./tools/web_update && sudo systemctl restart nginx

thank you in advance for any suggestions!

ok, I figured it out!

i needed to feed it my actual hostname proxypass http://example.com:1111;


not so fast…

I also needed to terminate that location with a forward slash


location /staticman/ {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header Accept-Encoding "";
    proxy_set_header X-Real-IP $remote_addr;
    access_log /var/log/nginx/reverse-access.log;
    error_log /var/log/nginx/reverse-error.log;

I don’t really know if I need those proxy_set_header’s

Try searching StackExchange for your issue. I suspect SuperUser, ServerFault, or StackOverflow will already have an answer somewhere for you.