G'Day.
My experience with WHM/cPanel is very limited, very limited may be an exaggeration LOL. I am helping someone move their site to a new server, The version is 7.0.9 but that is not needed for what I am asking help for.
Currently the domain points to the server and resolves to /home/user/public_html/
I need the web root to be changed for the domain/vHost to /home/user/public_html/web_site
cPanel is set up as one would use it in a shared hosting environment. The server is a dedicated server running CentOS 6.4
I have done some searches on this and it seems that I need to copy the current vhost to a post-processed config or something along that line? If I can get some understanding on this it would be appreciated and should be the final part of getting the person I am helping website back up and running.
Geeks, making the world a better place |
Question is this a share or vps account.
problem like this can usually get resolved though the hosting provider.
http://vi-bin.com |
She specified what it was in her post.
"The server is a dedicated server running CentOS 6.4"
https://www.deanbassett.com |
It's about the same as with regular ol' Apache. Edit:
/etc/httpd/conf/httpd.conf
and edit the DocumentRoot for the domain to something else (e.g., /public_html/webroot).
Next, run these two commands:
/usr/local/cpanel/bin/apache_conf_distiller --update
/usr/local/cpanel/bin/build_apache_conf
These two commands tell cPanel to update the configuration to include the changes made in httpd.conf, and then to rebuild the configuration files based on those changes.
And we're done.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Or should I just moved the site files under the public_html instead? I am not use to setting up cPanel controlled sites. Would a new site go under /home/user/public-html with its own cPanel for that site? After thinking about this, I think that would be the protocol to follow. Geeks, making the world a better place |
Or should I just moved the site files under the public_html instead? I am not use to setting up cPanel controlled sites. Would a new site go under /home/user/public-html with its own cPanel for that site? After thinking about this, I think that would be the protocol to follow.
If the site is the main domain on the account, it should indeed be under /public_html/. /public_html/ is the web directory for cPanel accounts; the main domain is served from that directory, and add-on domains/subdomains are served from their own directories located within /public_html/.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Or should I just moved the site files under the public_html instead? I am not use to setting up cPanel controlled sites. Would a new site go under /home/user/public-html with its own cPanel for that site? After thinking about this, I think that would be the protocol to follow.
If the site is the main domain on the account, it should indeed be under /public_html/. /public_html/ is the web directory for cPanel accounts; the main domain is served from that directory, and add-on domains/subdomains are served from their own directories located within /public_html/.
So if the user resold server space to a third party; someone with their own domain, then an account for that person would be set up with the webspace of /home/user/public_html/ and a cPanel account set up for them in WHM. The DNS for their domain name would point to the server's IP address and WHM would redirect requests for that domain to /home/user/public_html/. Is this an accurate assessment?
OK, so I need to move the files so they are under the public_html/ and the person will be good to go. Thanks Nathan.
Geeks, making the world a better place |
So if the user resold server space to a third party; someone with their own domain, then an account for that person would be set up with the webspace of /home/user/public_html/ and a cPanel account set up for them in WHM. The DNS for their domain name would point to the server's IP address and WHM would redirect requests for that domain to /home/user/public_html/. Is this an accurate assessment?
A user can host other people's sites on their account, but unless that user has reseller privileges (the ability to create cPanel accounts to resell hosting), domains would be tacked-on to their account. Add-on domains are simply that - domains attached to a cPanel account, and have their own directories under /public_html/ to serve content.
WHM is the server's control panel, while cPanel is the control panel for individual accounts. Apache is the web server, so it handles requests for domains, and serves up content based on the related DocumentRoot.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |