The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

build httpd conf sub-domain with two IPs

Discussion in 'General Discussion' started by sameeh.harfoush, Feb 17, 2014.

  1. sameeh.harfoush

    sameeh.harfoush Registered

    Joined:
    Feb 17, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello,
    i want to build httpd conf to include a sub-domain that listens to two IPs 127.0.0.1 (for internal access) and xx.xx.xxx.xxx (for external access). how can i configure /var/cpanel/userdata/USERNAME/sub.exmple.com to have two IPs and when building using /scripts/rebuildhttpdconf i end up with something like the below?

    <VirtualHost 127.0.0.1:80 xx.xx.xxx.xxx:80>
    ServerName sub.exmple.com
    ...
    </VirtualHost>

    assigning two IPs, separated by space, in the "ip" field for sub.exmple.com file is causing a compile error .

    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Using multiple IP addresses in a single VirtualHost is not natively supported with cPanel. However, since this is for an internal IP address, have you considered setting up a NAT environment instead? It's documented here:

    cPanel - NAT

    Thank you.
     
  3. sameeh.harfoush

    sameeh.harfoush Registered

    Joined:
    Feb 17, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    thanks for the update. but the cPanel-Nat link you provided didn't work it redirects to "This topic does not exist" page
     
  4. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Thank you for reporting that. I believe this has to do because cPanel is in the middle of switching to a new documentation system.
    The correct link for 1:1 NAT can be found here.
     
Loading...

Share This Page