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.

IP for subdomain in Apache Conf

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

  1. shankar.s

    shankar.s Registered

    Joined:
    Dec 14, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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 ?

    regards
    Shankar.S
     
  2. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    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?

    Regards.
     
Loading...

Share This Page