DocumentRoot must be a directory

I copied the default /var/www/* to /home/www

changed httpd.conf Document root to the new location

when i start apache

i get the error

Starting httpd: Syntax error on line 265 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
[FAILED]

why? the directory DOES exists!
MD Websunlimited [ Do, 10 März 2005 18:35 ] [ ID #689079 ]

Re: DocumentRoot must be a directory

tony wrote:

> I copied the default /var/www/* to /home/www
>
> changed httpd.conf Document root to the new location
>
> when i start apache
>
> i get the error
>
> Starting httpd: Syntax error on line 265 of /etc/httpd/conf/httpd.conf:
> DocumentRoot must be a directory
> [FAILED]
>
> why? the directory DOES exists!
>
>

Did you change all the directory entries and documentroot in your
httpd.conf? If not, the server still thinks /var/www/htdocs is the
documentroot but you moved it so it doesn't exist.

There are other paths in the conf file that need changed too.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) :( http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein
Uncle Pirate [ Do, 10 März 2005 19:05 ] [ ID #689080 ]

Re: DocumentRoot must be a directory

yes i did. actually i found out that it works for

/home/www

but not for /home/www/html

"Uncle Pirate" <stan [at] surecann.com> wrote in message
news:42308ccb$1 [at] nntp.zianet.com...
> tony wrote:
>
>> I copied the default /var/www/* to /home/www
>>
>> changed httpd.conf Document root to the new location
>>
>> when i start apache
>>
>> i get the error
>>
>> Starting httpd: Syntax error on line 265 of /etc/httpd/conf/httpd.conf:
>> DocumentRoot must be a directory
>> [FAILED]
>>
>> why? the directory DOES exists!
>
> Did you change all the directory entries and documentroot in your
> httpd.conf? If not, the server still thinks /var/www/htdocs is the
> documentroot but you moved it so it doesn't exist.
>
> There are other paths in the conf file that need changed too.
>
> --
> Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
> Webmaster/Computer Center Manager, NMSU at Alamogordo
> Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
> '94 1500 Vulcan (now wrecked) :( http://motorcyclefun.org/Dcp_2068c.jpg
> A zest for living must include a willingness to die. - R.A. Heinlein
MD Websunlimited [ Do, 10 März 2005 20:01 ] [ ID #689081 ]

Re: DocumentRoot must be a directory

Post removed (X-No-Archive: yes)
Notifier Deamon [ Do, 10 März 2005 20:57 ] [ ID #689083 ]

Re: DocumentRoot must be a directory

tony wrote:

> yes i did. actually i found out that it works for
>
> /home/www
>
> but not for /home/www/html

Please don't top post.

I've also used /home/www (actually /export/home/www) which worked well.
It's possible that Apache is detecting your path as a user's directory
although with the documentroot and directory entries correct in your
httpd.conf, it should work anyway.

Without seeing your conf file, I can't say with certainty, but I'd bet
there is a simple typo in your conf file.

It certainly is not unreasonable to move documentroot and/or the entire
installation directory to a different location. I have my documentroot
as /web/site. /web being a mounted hot swapable drive that can be
slipped into a backup system in case of hardware failure. It's all
backed up too but swapping the drive is the quick fix unless it's that
drive that's bad.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) :( http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein
Uncle Pirate [ Do, 10 März 2005 22:21 ] [ ID #689086 ]

Re: DocumentRoot must be a directory

Hello.

You got "DocumentRoot must be a directory" error even it is really a
directory because of SELinux extensions. Run
system-config-securitylevel (or redhat-config-securitylevel) to
disable SELinux for httpd or give SELinux permissions to that
directory:
chcon -R -h -t httpd_sys_content_t /path/to/directory

More help at: http://fedora.redhat.com/docs/selinux-faq-fc3/index.html
dan_delspam [ Do, 31 März 2005 23:47 ] [ ID #723209 ]
Webserver » alt.apache.configuration » DocumentRoot must be a directory

Vorheriges Thema: [STAT] Statistics of alt.apache.configuration 04/01/05
Nächstes Thema: Reverse Proxy as a Client for Certificate Based Auth