Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Linux machine and some applications are running web interfaces.

I'd like to create a web server, opened to the Internet, in order to access these local web interfaces (or web interface on others local machines).

Example, from the Internet:

http(s)://mywebserver/webmin  --> redirects to localhost:10000  (webmin interface)
http(s)://mywebserver/bitt   --> redirects to localhost:1234  (bittorrent client interface)
http(s)://mywebserver/httpd   --> redirects to localhost:88  (mini http server)
http(s)://mywebserver/ddwrt  --> redirects to 192.168.0.254:80  (dd-wrt interface)

etc...

Do you know a way to do this? I tried "pound" reverse proxy, but it doesn't work.

share|improve this question
1  
why is it not ok ? Your answer really is a reverse proxy. what's wrong with what you have. –  X Tian Feb 7 at 0:34
    
i configured pound, same as slm's answer, and the problem is that the "transfered" http request contains the wrong parameter, i mean: http(s)://mywebserver/bitt sends "GET /bitt" http request to the bittorrent client, which is not able to process this, so a get a blank page, a "GET /" request is necessary. Same problem with ddwrt or webmin. I would need pound to put "GET /" requests, instead of "GET /XXX" –  Matt Feb 7 at 18:52
    
Pound is designed to be clean lean and fast, so URL re-writing isn't provided. nginex could do that, however couldn't you add the alias to the target webserver ie /bitt => / –  X Tian Feb 7 at 19:07

1 Answer 1

You're definitely looking for a reverse proxy and Pound can do exactly what you want. So can a whole host of other reverse proxy technologies such as Varnish, Nginx, Apache, HAProxy, and others. To understand the difference take a look at this SO Q&A titled: Difference between proxy server and reverse proxy server.

Here's an example Pound configuration which should give you a rough idea of what you're looking for, from the article titled: Pound secure reverse proxy "how to". There's also another good example here, titled: Pound - Reverse Proxy Server.

ListenHTTP
  Address 192.168.1.5
  Port    80

    Service
      URL "/webmin"
      BackEnd
        Address localhost
        Port    10000
      End
    End

    Service
      URL "/bitt"
      BackEnd
        Address localhost
        Port    1234
      End
    End

End
..
...
share|improve this answer
    
thank you for your answer, i tried this, but the problem is: http(s)://mywebserver/bitt sends "GET /bitt" http request to the bittorrent client, which is not able to process it, so a get a blank page, a "GET /" request is necessary. –  Matt Feb 7 at 18:57
    
@Matt - ah, HTTPS is a different animal. Check this tutorial for an example of HTTPS: perfectlylogical.wordpress.com/2011/05/02/…. I don't have time to write it up now, lmk if it works and I'll add it to this A later tonight. –  slm Feb 7 at 19:30

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.