mod_proxy and Shared IP message

Discussion in 'Installation/Configuration' started by jlavetan, Jun 21, 2007.

  1. jlavetan

    jlavetan New Member

    I am using external name servers and inserted an "A" record for test.domain1.com to point my external IP. I have Apache 2.2 installed on a Windows machine that is using mod_proxy to forward requests to my LAMP server (with ISPConfig installed). All port 80 traffic is forwarded to the windows box with Apache / mod_proxy. Everything is behind a NAT firewall.

    With everything setup as it is currently, I get the "Shared IP" message when trying to go to either of the two sites I have setup in ISPConfig.

    If I take the windows box out of the equation and forward port 80 traffic directly to the LAMP server, the sites appear as they should.

    Is there something I'm missing?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you select the internal IP address for the website and not the external IP in ISPConfig?
     
  3. jlavetan

    jlavetan New Member

    Yes, the internal ip of 10.1.252.2 was selected.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you use in the proxy request configuration the domain or IP on your windows server? ISPConfig uses namebased vhosts, so you must use the domain in the proxy request and not the IP address.
     
  5. jlavetan

    jlavetan New Member

    On the Windows machine(proxy), httpd-vhosts.conf contains the following:

    Code:
    <VirtualHost *:80>
    #lamp
       ServerName lamp
       ServerAlias test.domain1.com
       ProxyPass            /      http://10.1.252.2/
       ProxyPassReverse      /      http://10.1.252.2/
    </VirtualHost>
    The ServerName "lamp" is in the hosts file of the Windows machine.

    This setup works for all of the other sites I have setup except for ISPConfig.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This can not work with virtula hosts as I posted anove, you must use the hostname and not the IP!

    If the website you want to access on the ispconfig server has the domain www.test.int, then your setup must look like:

    <VirtualHost *:80>
    #lamp
    ServerName lamp
    ServerAlias test.domain1.com
    ProxyPass / http://www.test.int/
    ProxyPassReverse / http://www.test.int/
    </VirtualHost>

    and the hosts file on your windows machine must resolve www.test.int to the correct internal IP address.
     
  7. jlavetan

    jlavetan New Member

    Can't believe I missed that...

    Anyway, thanks for you help... works perfectly :)
     

Share This Page