LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-16-2012, 10:39 AM   #1
louder_than_loud
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Apache httpd service won't start


Hi Everyone,

A little background on my problem:
We have a webserver running with centOS 4.7 and apache 2.2. It runs several virtual hosts, and was set up by a former colleague. Apache is installed in a mounted drive called /wwwroot

This webserver has now fallen under my control, and although I have some knowledge of linux systems, I'm still quite a newbie. The server has been running happily for months, but now the need has come up for me to add a new website to the server.

Now the problem:

I made a change to the httpd.conf file adding a new virtual host, a duplicate of the 6 other servers in the file (obviously changing the paths and servername), saved the file and restarted the httpd service. But the httpd service didn't restart, it fails claiming it can't find the httpd.conf file in the default location (/etc/httpd/), which is right, because the file isn't there and looks like it never has been, and I wouldn't expect it to be as Apache is installed in /wwwroot.
Hence my question, why is it suddenly looking there for the file? In the last week of messing about I've even come to realise that the conf file I changed may well not have even been the live file (he seems to have at least a dozen different versions of the file scattered over /wwwroot and /root folders). But either way I didn't change any paths to config files so I don't understand why it is now looking for files that have never been there.

I just tried running httpd -f /wwwroot/apache/conf/httpd.conf to force it to use that file and I get:

Syntax error on line 54 of /wwwroot/apache/conf/httpd.conf:
API module structure `authn_file_module' in file /wwwroot/apache/modules/mod_authn_file.so is garbled - perhaps this is not an Apache module DSO?


I tried running the make install (using the same config I presume he used) again, but still same problem.

Any ideas how to make this work now?

I know it's difficult without knowing the exact setup, but any help would be appreciated. I've enjoyed tinkering with it, but I'm pulliing my hair out and people are now nagging for some of these web services to be back online, so could do with sorting asap.

Thanks
 
Old 08-16-2012, 12:46 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,072

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
Hi and welcome to LQ,

Quote:
I just tried running httpd -f /wwwroot/apache/conf/httpd.conf to force it to use that file and I get:

Syntax error on line 54 of /wwwroot/apache/conf/httpd.conf:
API module structure `authn_file_module' in file /wwwroot/apache/modules/mod_authn_file.so is garbled - perhaps this is not an Apache module DSO?
What gives:
Code:
which httpd
My guess is that running just plain httpd you run the httpd binary installed by your distro (that's located in your $PATH), while the binary you need is probably /wwwroot/apache/bin/httpd, judging from the httpd.conf location.
So try:
Code:
/wwwroot/apache/bin/httpd -f /wwwroot/apache/conf/httpd.conf
and see what you get

Regards
 
Old 08-17-2012, 03:43 AM   #3
louder_than_loud
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Bathory, you are a genius that worked, I did try running httpd from within the /wwwroot/apache/bin/ folder before but still got the conf error, but as you say I guess it was still running the default service rather than custom. It's working again now!

I think I may try and setup an alternative machine from scratch just to try and get my head around the apache/PHP/OCI8 installation we're using here, just for future reference, but for now I'm happy it's all working again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
httpd service won't start GavB Linux - Newbie 4 01-19-2007 07:56 AM
Apache httpd won't start rob19 Linux - Software 6 05-06-2003 10:41 PM
httpd won't start (apache 2.0 newly installed) Who Linux - Software 1 03-28-2003 08:06 AM
Apache problem - httpd won't start. Iced_Falcon Linux - Networking 3 12-22-2001 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration