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!

IP for subdomain in Apache Conf

Discussion in 'EasyApache' started by shankar.s, Dec 7, 2010.

  1. shankar.s

    shankar.s Registered

    Dec 14, 2008
    Likes Received:
    Trophy Points:
    Hello ,

    We have a cpanel server in Amazon AWS EC2 . Due to NAT implementation , we have to use private IP in apache conf . So we are using the private IP in /etc/wwwacct.conf . This will make sure that when a domain is created , the apache conf will be having the private IP in the virtual host entry of the main domain . We also have our ns1 in the same cpanel server . when we create a domain , its db record will have the private IP . So we edited the DNS template so that when a new domain is created , the A record in the DNS record will be Public IP .

    The issue we are having is when a user creates a subdomain from his cpanel , the virtual host entry for that subdomain in apache conf is having the public IP as its IP address rather than the private IP ( eventhough we are using private IP in /etc/wwwacct.conf ) . When we create a main domain , its IP in virtual host entry is the private IP . We would like to know from where cpanel is taking the virtual host entry for the subdomain . Is there a template for this ? or is it taken from the DNS record of the main domain ? If it is taken from the DNS record , is there a work around for this so that when a subdomain is created , the virtual host entry for the subdomain should be the private IP ?

  2. cookiesunshinex

    cookiesunshinex Well-Known Member

    Jun 10, 2005
    Likes Received:
    Trophy Points:
    This is interesting.

    This is the first real post I have seen where someone was using cPanel on an Amazon EC2 server.

    Can you report on any other issues you have had. What AMI image are you using for your instance?


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