Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Apr 2008
    Posts
    14

    Default Shared IP, Apache Virtual Hosts and DNS

    Hello,

    we have the cPanel machine located behind a local firewall. The cPanel machine is on 192.168.15.0/24 network, and has a local IP 192.168.15.3, so this is it's shared IP in cPanel.
    So the problem is now, when I add a new user with it's domain, the points to the cPanel shared IP, the local IP. So the domain is unreachable from the outside, unless if I manualy change the DNS records.

    But, if I set the Shared IP to the external networks IP, 1.1.1.1, then the domain works ok, outside world can reach it, but the problem starts with Apache Virtual Domain, then it shows the wrong(the main) web page of the server and not the domains page.

    Now I've solved this so, that I've changed the Shared IP back to the local IP address of the server, so that the apache virtual hosts work, and change the DNS Zone Templates, to input IP 1.1.1.1 instead of %ip% (which refers to Shared IP right?)

    I'm only posting this to find out if this is ok, or if there is a more elegant solution to this problem?

  2. #2
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    That's one solution that will work. We currently don't have support for NAT built into cPanel. This is something we plan on building into the product in the future.

    Until then, putting the public IP in the DNS templates and the private IP in WHM works. Alternatively, you could put the public IP in WHM and put the private IP in Apache vhost templates. No reason to change what you have though if it's working.


    Of note: Some other features requiring the public/private IP to be accurate may also be affected.

  3. #3
    Member
    Join Date
    Apr 2008
    Posts
    14

    Default

    Until now only DNS "flaw" was discovered here, and if there isn't any better solution for now (except the other way around) I'm leaving it like this. Don't fix what ain't broken.

Similar Threads & Tags
Similar threads

  1. Virtual Hosts Redirection
    By n00bie in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-17-2010, 04:59 PM
  2. About apache virtual hosts
    By phpserver in forum New User Questions
    Replies: 3
    Last Post: 11-03-2008, 10:08 AM
  3. how to edit apache virtual hosts in cpanel
    By natnet123 in forum New User Questions
    Replies: 1
    Last Post: 12-06-2007, 01:22 PM
  4. Virtual hosts problem
    By mgdoyle in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-24-2004, 11:34 AM
  5. help virtual hosts
    By dilut3d in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-10-2004, 09:17 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube