Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    New Jersey

    How to get multiple domains, with different IPs, to point to the same DocumentRoot?

    I have Linux dedicated server with its own nameserver. What I want to do is to point a group of domains I have registered (and pointed to my nameserver) to the same DocumentRoot—e.g. /home/example/public_html.

    How can I do this using httpd.conf? I don’t want to use the cPanel add-on domain feature, because I don’t want to user sub-directories, and because I want to do this with a large number of domains and be able to change their IP’s easily.

    I've tried placing various permutations of the following entry into httpd.conf (including with only the ServerAlias, ServerName, and DocumentRoot directives), but it hasn't worked so far:

    DocumentRoot /home/example/public_html
    ServerAdmin [email protected]
    BytesLog domlogs/
    User example
    Group example
    CustomLog domlogs/ combined
    ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/

    After placing this type of entry into httpd.conf, trying to access the IP specified goes to the cPanel “domain not configured” page, and trying to access the domain gives a “site not found”.

    When I add a domain onto an account with cPanel, what steps does it take? Other than editing httpd.conf, is there anything else I have to do?

  2. #2
    Join Date
    Feb 2005
    I am air u breathe


    Ooops.. sounds crazy. If theory goes fine it should work like snap!

    Could you try adding each entry for host in different files, by the name " httpd.conf "

    and later update your main apache configuration as

    Include <the path the respective configuration file>

    I guess this should help you.

    Do keep me updated.

    It is reliability that counts...
    Few tips

  3. #3
    Join Date
    Mar 2003
    Sacramento, CA
    I think you could user mod_rewrite rules for this.
    Jacob Squires , CISSP

    · security assesment, network analysis ·

  4. #4
    Join Date
    Nov 2004
    New Jersey
    Turns out I had to add a DNS zone for the domain through WHM.

    Thank for the replies.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts