Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    43,717
    Likes Received:
    1,794
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    575
    Likes Received:
    20
    Trophy Points:
    93
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,717
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice