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.

Put server back to ip/www/html addressing??

Discussion in 'General Discussion' started by villabus, Jul 2, 2010.

  1. villabus

    villabus Registered

    Joined:
    Jul 2, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi
    Cpanel changed my site and added the domain as to where it starts.

    example I used to go to http://123.123.123.123/info.php

    which was folder /var/www/html/info.php now I can not.

    How do I make it go back to that default and not look for a public_html folder?

    Thanks
     
  2. Pyloth

    Pyloth Member

    Joined:
    Jul 9, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Place these rules within your .htaccess file as located in your ~/public_html directory.

    Remember to replace "domain.com" and "subfolder" with your own information.

    Also, remember to place the following statements at the very beginning of your .htaccess file if they haven't already been entered.

    Code:
    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    Source: /public_html directory change - Hostmonster Forums
     
  3. Miraenda

    Miraenda Well-Known Member

    Joined:
    Jul 28, 2004
    Messages:
    242
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Coralville, Iowa USA
    The request was re-mapping to /var/www/html/info.php rather than /home/user/public_html/something

    To change a domain's document root, you'd need to edit the file in /var/cpanel/userdata/username/domain.com location where username is the cPanel username and domain.com is the domain name. In that file, there will be a documentroot line. Simply change the path.

    If this isn't what you mean, please specify precisely whether this isn't a domain but the hostname or something else (if it's the hostname, you'd change /var/cpanel/userdata/nobody/hostname.domain.com documentroot location).

    After changing the documentroot path in the file, you'd need to rebuild Apache and restart it (after making a backup):

    Code:
    cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak100709
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
     
Loading...

Share This Page