This question has been archived.

Nginx behind OpenVPN - the web server sees my real IP address. Why?

October 17, 2014 3.6k views

I have deployed a Debian 7 x64 droplet with nginx and OpenVPN running on it.

Nginx is configured to serve two virtual hosts(server blocks) and I would like that one of it to be accessible only through the VPN.

I've tried using the allow and deny directives, allowing access only for the VPN's IP address(which is the same with the nginx's one, as they run on the same droplet), but checking the nginx logs I found out that the web server sees my real IP address, not the VPN's one, althou I'm connected to it, thus I'm not able to put Nginx behind OpenVPN.

Can I fix this? Or is there another solution for this? Thanks.

1 comment
Be the first one to answer this question.