Dear all,

I can't setup the httpd server document root other from the default.

The default setting is DocumentRoot "/var/www/html". However, when I set the default web link to DocumentRoot "/home/webadmin/public_html", the httpd service can't start and display "failed".

Can anyone help me? Thanks!

Gavin

typically you add a document root and access ( i dont ever delete the original)

then i add a virtual host (both bits are needed):

NameVirtualHost 10.1.1.x
<VirtualHost 10.1.1.x>
ServerName virtualservername.crap.com
DocumentRoot /pathtodocumentroot
</VirtualHost>

<Directory /pathtodocumentroot
order allow,deny
allow from 10.1.1.
~OR~
allow from .crap.com
<Directory>

add virtualservername.crap.com to /etc/hosts
and restart httpd. if its good,
add a reverse and a .crap.com entry to DNS

----------------------------
are you certain that there wasnt anything required in /var/www/html
that needs to be in /home/webadmin/public_html if youre moving it in its entirety?

is your syntax in httpd.conf correct?
did your change/add all instances of /var/www/html to match /home/webadmin/public_html ? you do need to set access to this document root
as well.. look for a string like this (as with the virtualhost above): <Directory /var/www/html>
copy it and modify it to suit your needs then allow your networks
and attempt to restart your webserver.

are you restarting httpd as the root user? if not does your user have permissions
and access rights to files or to start the webserver?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.