Results 1 to 2 of 2
  1. #1
    -Anti- is offline Senior Member
    Join Date
    Apr 2009
    Posts
    109

    Default edited documentRoot (httpd.conf) but it does not redirect [solved]

    Firstly, please do not edit anything in any of my accounts; this is just a question.

    I'm running drupal in a subdomain: site.mydomain.com

    Up until now I've been using htaccess rewrites, so that when someone puts mydomain.com in their browser bar, htaccess puts them in mydomain.com/site and them stealths the /site/ part of the url. So effectively the user thinks the website is installed in root.

    However, I thought in the interest of 'doing things properly' and learning a little more about apache, I would try changing the documentRoot of the main domain rather than rely on htaccess.

    So I opened: /var/cpanel/userdata/USERNAME/MYDOMAIN.COM -> 'mydomain.com'

    I edited the documentRoot line: DocumentRoot /home/USERNAME/public_html/site
    (Because 'site' is a subdomain, I also edited: scriptalias path: /home/bsgccom/public_html/site/cgi-bin )

    Then I rebuilt the httpd.conf file using: /scripts/rebuildhttpdconf

    I checked httpd.conf, and the changes are there.

    However, mydomain.com still directs to public_html

    Perhaps I have to restart apache? EDIT: YES. ONCE I DID THIS IT WORKED

    Thanks!
    Last edited by -Anti-; 08-01-2010 at 18:32.

  2. #2
    eukSam is offline Administrator
    Join Date
    Aug 2007
    Posts
    169

    Default

    Hello,


    Yes, you have to restart apache after any changes done to the apache conf. After restarting the apache service, the change takes effect.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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