httpd Error?

tom.ferguson

Verified User
Joined
Jan 21, 2004
Messages
7
Location
York, UK
Hello!

I recently got my own dedicated server, just a small personal box and its running direct admin, red hat 9, and the latest release of apache..

Everytime i add/resave a site/subdomain my httpd config gets borked, and incomplete, so apache wont start.. everytime i correct the config, it reloads a bad version.

Syntax error on line 251 of /usr/local/directadmin/data/users/tommy/httpd.conf:
ServerRoot cannot occur within <VirtualHost> section
[FAILED]

any help would be great :(
:confused:
 
The problem is simply you have a ServerRoot directive within the virtualhost section, this should not be.

A simple fix is to open that file in shell and:

Code:
# Frontpage requires these parameters in every httpd.conf file or else
# it won't work.
Port 80
ServerRoot /etc/httpd

<virtualhost IP:80>
..
...
....
etc

Remove any instances of ServerRoot from within the virtualhost tags.

Chris
 
thanks for the prompt reply, however.. i dont want to have to do this every time i add or change something via DA, i need a solution that will fix this bug full .

any further help would be greatly appreciated...

:confused:
 
Hello,

I think you might have an "open" <VirtualHost> directive somewhere.. check your httpd.conf files for an unclosed directive </VirtualHost> ... because the top of an httpd.conf file should definately not be inside an already opened virtualhost.

John
 
Hello,

Just a follow up for anybody debugging httpd.conf errors to check and clear any custom httpd.conf values they might have until the problem is fixed. (source of the problem in this case).

John
 
Back
Top