Running a Tor Hidden Service with nginx Reverse Proxy
Most production .onion sites run nginx behind Tor. This pattern gives you proper reverse-proxy features (rate limiting, cache headers, CORS) while exposing only the .onion address externally. AnubizHost offshore VPS is Tor-friendly and ships ready for this stack.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
Install Tor and nginx
apt install tor nginx. Edit /etc/tor/torrc to add HiddenServiceDir /var/lib/tor/site/ and HiddenServicePort 80 127.0.0.1:8080. Restart Tor. Grab the .onion from /var/lib/tor/site/hostname.
nginx Config
Bind nginx to 127.0.0.1:8080. Disable absolute redirects to your clearnet domain. Strip Server header. Disable error pages that leak version.
Hardening
Disable JS-heavy features (use them sparingly - Tor Browser users often have JS disabled). Use server_tokens off. Rate limit by request count rather than IP (all Tor clients share circuit IPs).
Related
Related Services
Privacy & anti-censorship guides
Why Anubiz Host
Ready to get started?
Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.