I'm dealing with a minor information disclosure when using nginx with onions. Servervault.com might be better suited for an nginx question, but I'm not sure a lot of those guys understand onions or the importance of anonymity, so I'm coming here first.
/ at the very end does not disclose any server-side info.
/ at the end, returns this address in the URL bar:
18080 being the tor forwarding port. My nginx server is bind to 127.0.0.1 so the website isn't public facing. The http error page (I think it's a 301) doesn't disclose any info beyond that, I don't think -- making this disclosure very minor but still I would like to resolve it.
I played around with rewrites like:
rewrite ^/directory(.*)$ http://myonionsite.onion redirect;
This kinda worked but I found it caused 302 errors with other elements on my site, such as
/logo.png -- which I found bizarre and confusing.
What's the proper way to deal with something like this?