Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an Apache server in home connected to a router that only allow 1 server on port 80. Everything is working fine, but now I have one Mac Mini Server that is configured to use port 80.

How can I redirect an sub-domain from my main server to an internal IP address (Mac Mini server)?

The main server's IP is 10.0.0.73 and that of the Mac Mini is 10.0.0.82. Is that possible?

I tried to use proxy but i dont know if it is well configured.

share|improve this question

migrated from serverfault.com Dec 7 '11 at 22:43

1 Answer

You can use apache to proxy requests for you other domain, create a virtual host that responds to the subdomain and then sends the requests to your mac.

<VirtualHost *:80>
        ServerName    subdomain.lan
        ProxyRequests Off
        <Proxy *>
                Order deny,allow
                allow from all
        </Proxy>
        ProxyPreserveHost On
        ProxyPass / http://ip.ad.re.ss/
        ProxyPassReverse / http://ip.ad.re.ss/
        ProxyErrorOverride Off
        ErrorDocument 404 /notavail.html
</VirtualHost>
share|improve this answer
This is a disgusting solution (mod_proxy sucks!), but it also happens to be the right one given the constraints above. – voretaq7 Aug 25 '11 at 18:57
@Iain Hi, thanks for your answer. Unfortunately this doesn't work in my setup and i dont know why. I can access my mac server in local network via ip address or via subdomain (if in mac server) but not for other computers on lan network. – Mozack Aug 25 '11 at 22:14

Your Answer

 
discard

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