Skip to main content

VirtualHost include not working

Comments

4 comments

  • pabmeister
    I have also tried (after removing the above edits) putting a new *.conf file into the userdata folder (which I had to create) putting in all the VHost info, and adding an extra alias. The file saved OK and I restarted Apache. Same cgi page is served up when I goto mappeddomain.com. I even tried putting in a file name afterwards (that I can access via exisitngdomain.com/file.txt) but it just gives me a 404 error. I am sure I have done this all correctly, but it just doesn't work :/
    0
  • Shavaun
    I may not be understanding you correctly, but it sounds like you are trying to create what we refer to as a "parked domain." You can find instructions on how to add a parked domain and set it to redirect to another domain here: As far as modifying your httpd.conf file manually, we don't recommend it since most features are available via WHM. However if you must do so, our documentation about how to do it is here:
    0
  • pabmeister
    Just a quick update, before I read the documents you linked. I did actually manually edit the httpd.conf, adding "mappeddomain.com" as an entry in the ServerAlias for the existingdomain.com VHost entry, and it now works. Seems there are issues when trying to use includes (both the includes in WHM and includes via the userdata .conf file) [COLOR="silver">- - - Updated - - - OK< I read the Parked Domain docs, and I did actually try this in cPanel, but in my current tests, "mappedomain.com" is mapped to the server via an A Record. The cPanel "Parked Domains" tool states that the domain you are trying to "park" must be pointed to the Nameservers, something I do not want to do in this current test. The A Record should be enough (and in fact, it is, as I got this to work by manually editing the main httpd.conf file - something I don't want to do, but it was the only way this work would)
    0
  • Shavaun
    I'm not aware of any issues with the include files, but it sounds like you got it working. Were there incorrect instructions in the documentation or was anything unclear? Regarding the built-in functionality in WHM for Parked Domains, you can enable the "Allow Remote Domains" option in the Domains tab of the Tweak Settings interface. We disable this by default to prevent security and fraud problems, but it will allow you to add a Parked domain without it pointing to the nameservers, after which you can disable the option again.
    0

Please sign in to leave a comment.