Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been trying to get lighttpd or apache2 (I prefer lighttpd) to work behind a proxy but no luck so far.

What I want is to run lighttpd (or port 80) behind a proxy, so that when someone goes to some.website.com, and the DNS for that domain is pointed to the IP address of the proxy server, they end up on my http server's page.

This would allow me to use the server's resources, while keeping it's IP address hidden.

Unfortunately, using the proxychains program did not work. For lighttpd it gave the error getaddrinfo failed: Unknown error ' ::' and proxychains apache2 start started just fine, but it didn't seem to do anything. I did test if the proxychains program itself worked, and it used the proxy just fine using curl on a what-is-my-ip type of website.

If you're wondering; I am temporarily using a homeserver, and I don't want to make my IP address public.

Any ideas? Both a HTTPS proxy (squid) or a SOCKS5 (dante) proxy will do just fine.

share|improve this question
add comment

3 Answers

The proxy that you chose must support "reverse HTTP proxying". See: http://en.wikipedia.org/wiki/Reverse_proxy

share|improve this answer
    
This isn't an answer to my question ;O –  natli Apr 19 '12 at 13:42
add comment

You mentioned that squid would work just fine. Is there a reason you didn't just fire up squid? It's probably the simplest proxy solution to configure.

share|improve this answer
    
I don't know how to use the http server behind the squid proxy. –  natli Apr 19 '12 at 19:51
add comment

Using Apache and mod_proxy you could write one or more simple rules such as

ProxyPass /foo http://internal-ip/bar

This way the Apache server hides the internal server(s).

share|improve this answer
    
I already tried mod_proxy. I set up an ssh connection to the proxy server in Daemon mode using port 5555, and then added ProxyPass / http://localhost:5555 to the config, but it didn't do anything. –  natli Apr 19 '12 at 13:44
    
I've probably misunderstood something. Why SSH, why did you set up a connection and why localhost? I though the scenario was that a HTTP reqyest was made from the Internet to the Proxyy server, which then redirected the HTTP request to the internal server? –  erikxiv Apr 19 '12 at 13:47
    
I should have been more clear, this is why I used SSH to get the proxy connection: link to article . And yes, that's exactly what I'm trying to do. –  natli Apr 19 '12 at 13:53
    
I believe that proxychains allow you to start a program on your client machine and route all the network traffic from that program through SSH to your SSH server, essentially acting as if the program (such as a web browser) were running on the SSH server (inside your local network). Is that what you want to achieve? If so, you should not use neither Apache nor lighttpd, but only proxychains. –  erikxiv Apr 19 '12 at 14:32
    
Proxychains didn't do anything, as I stated in my question. I don't know why it doesn't just work.. it should ;/ And how would I be serving web pages if I wasn't using apache or lighttpd? I'm trying to run a server here, not visit some website using a proxy. Someone request page -> Proxy sends request to http server -> http server serves page to proxy server -> proxy server forwards page to requester. –  natli Apr 19 '12 at 19:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.