PDA

View Full Version : httpd Error?



tom.ferguson
01-25-2004, 06:51 PM
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:

ProWebUK
01-25-2004, 07:43 PM
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:



# 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

tom.ferguson
01-25-2004, 08:27 PM
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:

DirectAdmin Support
01-26-2004, 10:23 AM
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

tom.ferguson
01-26-2004, 12:32 PM
Hi john, is there an adress i can send you/someone the httpd.conf to, so they can have a look?

:confused:

cheers

ProWebUK
01-26-2004, 12:47 PM
chris@prowebuk.com

Chris

DirectAdmin Support
01-27-2004, 10:28 AM
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