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.

Need to Make Changes in VirtualHost

Discussion in 'General Discussion' started by jaydrake, Dec 2, 2010.

  1. jaydrake

    jaydrake Registered

    Joined:
    Oct 26, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I am working with three domains where the intent is for all of them to utilize the same DocumentRoot, and I know exactly what I need to do in the httpd.conf to affect these changes, but know that doing this directly will result in these changes being overwritten by cPanel at regular intervals.

    The specific changes I want to affect for 2 of the 3 VirtualHosts is to change teh DocumentRoot and the user/group used for suPHP_UserGroup and SuexecUserGroup.

    I have been searching all over and the best information I have found has been here:

    Changes Contained within a VirtualHost Directive

    Unfortunately I seem to be missing something as when I try to follow how this works I fail to achieve the desired results.

    Could someone please help me figure out what files I need to modify and what scripts need to then be run for my changes to take effect?

    TIA

    Jay Drake
     
  2. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    1
    Trophy Points:
    8
    Can't you just treat them as parked domains under 1 account?
     
  3. jaydrake

    jaydrake Registered

    Joined:
    Oct 26, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I don't actually know. I am unfamiliar with parked domains in cPanel. Giving it a quick whirl, however, I come up with the following response:

    Error from park wrapper: Using nameservers with the following IPs: xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

    The situation is that this is a subdomain (promotions.domainname.com) where the main site for the domain is hosted on another server. If I understand the directions given here, I need to add the nameserver(s) from the server that is hosting the main domain name to the /etc/ips.remotedns file and create A records pointing back to the server where I want the domain to reside (which already exists) - Is this accurate?

    Will parked domains actually maintain the domain name that the visitor used to reach the site and do they use the full directory structure or only a single page? Will I be able to have SSL on domains parked in this manner? (A necessity.)

    Thanks,

    Jay
     
  4. jaydrake

    jaydrake Registered

    Joined:
    Oct 26, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I finally learned that I could just change the documentroot in the /usr/local/apache/conf/httpd.conf and run /usr/local/cpanel/bin/apache_conf_distiller --update and it happily hangs on to that information and uses it for me. This was a win. Unfortunately I get a 500 Internal Server Error that shows up in the logs as this:

    SoftException in Application.cpp:422: Mismatch between target UID (xxy) and UID (xxx) of file "/home/<user>/public_html/<dir>/<file>.php"

    Changing permissions on files gives me different errors (because cPanel is protecting me against cross-site scripting, it seems) about the permissions on the files which also keeps the main user from being able to access them.

    Any help with this is surely appreciated. I feel like I'm standing at where the finish line is supposed to be and it's been hidden.
     
  5. jaydrake

    jaydrake Registered

    Joined:
    Oct 26, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    My new work around. Parked domain didn't seem to work for me, but add-on domain seems to be working well so far. Hopefully SSL won't be an issue there. I did have to jump into the httpd.conf, following the steps noted above, to change the ip address for the new add-on domain. Other than that, things seem to be working as I want them to now.

    Thanks for the help. I will post again when I know more about how this all works out.

    Jay
     
Loading...

Share This Page