Ssh tunnel to web site behind Nginx proxy
Hello,
I setup a web site that is using Apache and Nginx as a proxy. The web site itself runs fine. I want to access the web site with a SSH tunnel on my laptop. I can create the tunnel by: Code:
$ ssh -v -N -p 22 www.mueller-public.de -L 2110:127.0.0.1:80 Code:
www.mueller-public.de 127.0.0.1 - - [28/Jan/2014:16:51:28 +0100] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0" "-" I just want to use an SSH tunnel to access the web site. Do I need to modify some different Http header? * https://addons.mozilla.org/en-US/fir...odify-headers/ |
If this is for testing purposes shouldn't you just set the domain name and IP address in your /etc/hosts file? ...or phrased differently: why do you think you need SSH?
|
I was trying to change my hosts file but the result is just the same. I was following the guide here:
http://stackoverflow.com/questions/1...ugh-ssh-tunnel Also this guide that is mentioning the method of the Addon: http://stackoverflow.com/questions/1...-remote-server Both methods are not working. The Nginx log file is showing the correct domain but Nginx is still serving me the default page. I was thinking for security reasons. I have multiple domains on the same server, by name based virtual hosts, but only one IP address. So I can't use SSL for each domain. Normally, I could use SSH tunnel to access admin pages so that the password is encrypted. But it doesn't work. |
Quote:
Code:
127.0.0.1 localhost www.mueller-public.de |
Hello,
I have change the hosts file to: Quote:
Quote:
http://www.mueller-public.de:2110/ I get still the default Nginx page. But why will all those methods the HTTP host is correctly "www.mueller-public.de", as shown in the logs? Thank you for your replies. |
Shouldn't that be
|
I try with curl, it's the same default Nginx page. But in access.log the Host is correctly specified as www.mueller-public.de
Code:
www.mueller-public.de 127.0.0.1 - - [30/Jan/2014:13:10:16 +0100] "GET / HTTP/1.1" 200 612 "-" "curl/7.29.0" "-" |
Update:
I successful connected now to the virtual host by using Code:
$ ssh -v -N -p 22 anr-institute.com -L 2110:www.mueller-public.de:80 Code:
curl -H 'Host: www.mueller-public.de' http://localhost:2110/ |
All times are GMT -5. The time now is 01:55 PM. |