Changing Default Directory from /usr/apache/htdocs to /home/accountname/public_html
I've searched all over but can't seem to find a correct answer for this.
Right now my server is serving some of my website from /usr/apache/htdocs which shows only errors and some from
/home/account/public_html
how do I bypass usr/apache/htdocs?
-
[quote="mhernandez84, post: 1607461">I've searched all over but can't seem to find a correct answer for this. Right now my server is serving some of my website from /usr/apache/htdocs which shows only errors and some from /home/account/public_html how do I bypass usr/apache/htdocs?
Why would you want to do this? I must be misreading your post. Could you clarify why you're serving a website from /htdocs/?0 -
[quote="Infopro, post: 1607502">Why would you want to do this? I must be misreading your post. Could you clarify why you're serving a website from /htdocs/?
I'm not serving the website from /htdocs/ this is something the server configured on its own. From my httpd.conf AllowOverride All Options All Options All AllowOverride None Require all granted ServerName xx.xxx.xx.xxx DocumentRoot /usr/local/apache/htdocs ServerAdmin xxxx@gmail.com suPHP_UserGroup nobody nobody UserDir disabled I tried over riding that in the includes files as it suggests in the httpd.conf file but when i browse to my main domain I get the default cgi-sys/defaultwebpage.cgi page. When I check the access logs and error logs I get: /usr/local/apache/htdocs/sites...etc for files its looking for that are in public_html0 -
Ok, so, don't do what LostNerd said to do. You shouldn't edit httpd.conf directly, and that concept is plastered all over the cPanel documentation for EasyApache as well as the httpd.conf file itself. If you want to change the default vhost, it's simple: 1. go into /var/cpanel/templates/apache2 2. copy main.default to main.local 3. edit main.local and change the docroot for the default vhost. If you're using suphp, make sure to adjust the user/group as well 4. run /scripts/rebuildhttpdconf 5. restart apache 0 -
[quote="vanessa, post: 1607522">Ok, so, don't do what LostNerd said to do. You shouldn't edit httpd.conf directly, and that concept is plastered all over the cPanel documentation for EasyApache as well as the httpd.conf file itself. If you want to change the default vhost, it's simple: 1. go into /var/cpanel/templates/apache2 2. copy main.default to main.local 3. edit main.local and change the docroot for the default vhost. If you're using suphp, make sure to adjust the user/group as well 4. run /scripts/rebuildhttpdconf 5. restart apache
I followed your instructions and when I restarted apache the httpd.conf was unchanged.0 -
It the httpd.conf was unchanged, it means you're doing it wrong. The procedure above has worked the dozens of times I've done it. Re-read the instructions. It also wouldn't hurt to read the docs: [url=http://docs.cpanel.net/twiki/bin/view/EasyApache/Apache/ApacheConfigurationFile]EasyApache: The Apache Configuration File & Building Apache [url=http://docs.cpanel.net/twiki/bin/vief/EasyApache/EasyApacheCustomDirectivesOutsideVirtualHost]EasyApache: Changes Contained Outside a VirtualHost Directive 0 -
[quote="vanessa, post: 1607552">It the httpd.conf was unchanged, it means you're doing it wrong. The procedure above has worked the dozens of times I've done it. Re-read the instructions. It also wouldn't hurt to read the docs: [url=http://docs.cpanel.net/twiki/bin/view/EasyApache/Apache/ApacheConfigurationFile]EasyApache: The Apache Configuration File & Building Apache [url=http://docs.cpanel.net/twiki/bin/vief/EasyApache/EasyApacheCustomDirectivesOutsideVirtualHost]EasyApache: Changes Contained Outside a VirtualHost Directive
About to try it again. I'm using apache 2.4 so I actually need to change the files in that location. I'll be back with an update, thank you, this is the most progress I've made all day!0 -
[quote="vanessa, post: 1607552">It the httpd.conf was unchanged, it means you're doing it wrong. The procedure above has worked the dozens of times I've done it. Re-read the instructions. It also wouldn't hurt to read the docs: [url=http://docs.cpanel.net/twiki/bin/view/EasyApache/Apache/ApacheConfigurationFile]EasyApache: The Apache Configuration File & Building Apache [url=http://docs.cpanel.net/twiki/bin/vief/EasyApache/EasyApacheCustomDirectivesOutsideVirtualHost]EasyApache: Changes Contained Outside a VirtualHost Directive
Thank you! Got everything working now!0
Please sign in to leave a comment.
Comments
7 comments