Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

can't start apache in centos 5.x

Posted on 2010-11-10
18
1,768 Views
Last Modified: 2012-05-10
Hi,

I can't start apache on my centos 5.x Here's the error I receive:
[root@seokingdomheaven vkimura]# /etc/init.d/httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 187 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_rewrite.so into server: /etc/httpd/modules/mod_rewrite.so: undefined symbol: ap_get_server_banner
                                                       
0
Comment
Question by:Victor Kimura
  • 9
  • 5
  • 3
  • +1
18 Comments
 
LVL 13

Expert Comment

by:darren-w-
ID: 34102676
are you sure you have super user access?
0
 
LVL 13

Expert Comment

by:darren-w-
ID: 34102693
Looking at your error again, it looks like mod_rewrite.so has an error, has it been modified recently?
0
 

Author Comment

by:Victor Kimura
ID: 34102847
No, mod_rewrite.so hasn't been modified.

I have su access. It's at root with these commands.

I think the problem lies in that when I compiled apache I didn't use the default centos install paths. It was based on a one of the recommendations of an expert here. I think that's why but how do I figure this out?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 5

Expert Comment

by:balasundaram_s
ID: 34103307
Did you upgrade Apache?  What version of Apache running?  
Is this first time, Apache being compiled and made run on this server?

'ap_get_server_banner" is not available until httpd version 2.2.4.


0
 

Author Comment

by:Victor Kimura
ID: 34103399
[root@seokingdomheaven vkimura]# httpd -v
Server version: Apache/2.2.3
Server built:   Nov 12 2009 18:43:41

This is where httpd is located:
[root@seokingdomheaven vkimura]# which httpd
/usr/sbin/httpd
0
 
LVL 5

Expert Comment

by:balasundaram_s
ID: 34103439
Is it possible to upgrade to 2.2.4?  
I dont have any other option to resolve this issue, except upgrade.
0
 

Author Comment

by:Victor Kimura
ID: 34103512
Do you know if /usr/sbin/httpd is the default location?

How do I upgrade to 2.2.4? What are the commands? Sorry, newbie questions but I don't use my centos often. I forget the commands.
0
 
LVL 13

Expert Comment

by:darren-w-
ID: 34104001
yum update mysql-server
0
 

Author Comment

by:Victor Kimura
ID: 34104641
httpd restart is still failing. Any ideas?
0
 

Author Comment

by:Victor Kimura
ID: 34104648
How can I upgrade from 2.2.3. to 2.2.4? I don't know if that will resolve the problem though.
0
 
LVL 5

Assisted Solution

by:balasundaram_s
balasundaram_s earned 250 total points
ID: 34104885
Look at the section "Upgrading of Apache 2.2.3 to Apache 2.2.4"  in the below link:

http://www.freelinuxtutorials.com/tutorials/centos-lamp-installation/

or You may download the source and compile it.
0
 

Author Comment

by:Victor Kimura
ID: 34109685
I can't find:
3.    Download httpd-2.2.4-4.x86_64.rpm from http://rpmfind.net/
4.    Download httpd-devel-2.2.4-4.x86_64.rpm from http://rpmfind.net/
5.    Download lib64db4.5-4.5.20-1mdv2007.1.x86_64.rpm http://rpmfind.net/
6.    Install lib64db4.5-4.5.20-1mdv2007.1.x86_64.rpm

on
http://rpmfind.net/linux/rpm2html/search.php?query=apache&submit=Search+...&system=&arch=

I tried searching by 'apache' and 'httpd' but I can't find them. I tried even searching for them via google but still no luck. I'd like to try and avoid compiling for time's sake. Aren't there dependencies that I may miss if I compile from source?

If you have a direct page that would so helpful to me. =)
0
 
LVL 13

Expert Comment

by:darren-w-
ID: 34109830
Hi,

Can I assume that you have tried running "sudo yum update mysql-server" on the command line? In order to get the system to automatically upgrade the apache?

Darren
0
 

Author Comment

by:Victor Kimura
ID: 34110145
Hi darren-w,

I tried that. I still can't restart httpd.
[root@seokingdomheaven vkimura]# /etc/init.d/httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 187 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_rewrite.so into server: /etc/httpd/modules/mod_rewrite.so: undefined symbol: ap_get_server_banner
                                                           [FAILED]
[root@seokingdomheaven vkimura]#

That didn't update apache:
[root@seokingdomheaven vkimura]# httpd -v
Server version: Apache/2.2.3
Server built:   Nov 12 2009 18:43:41

Do you know where I can find the latest rpm for httpd?
0
 
LVL 5

Expert Comment

by:SimonDard
ID: 34111446
To summarize, you downloaded the source code of Apache, compiled it, installed it and now (re)starting Apache ends prematurely in an error stating there's something wrong with mod_rewrite.so

Apparently, the newer compiled Apache is trying to load a version of mod_rewrite.so which is incompatible with it. I can think of 2 causes:
1. During compiling mod_rewrite was not built and therefore not replaced. Soluation: when configuring Apache before compiling (./configure before make), you need to add the right flag for adding mod_rewrite (and any other mod for that mather).
2. mod_rewrite was built, but got placed in another location. Solution: use (s)locate to scan your drive(s) for mod_rewrite and replace the failing mod_rewrite with the newer one.

0
 
LVL 13

Assisted Solution

by:darren-w-
darren-w- earned 250 total points
ID: 34111487
0
 

Accepted Solution

by:
Victor Kimura earned 0 total points
ID: 34111911
I have this:
[vkimura@seokingdomheaven ~]$ locate httpd.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf.save
/etc/httpd/conf/original/httpd.conf
/etc/sysconfig/ha/conf/httpd.conf
/home/vkimura/.kde/share/apps/RecentDocuments/httpd.conf.desktop
/home/vkimura/httpd-2.2.14/docs/conf/httpd.conf
/home/vkimura/httpd-2.2.14/docs/conf/httpd.conf.in
/usr/local/apache/conf/.httpd.conf.swp
/usr/local/apache/conf/httpd.conf
/usr/local/apache/conf/httpd.conf.bak
/usr/local/apache/conf/httpd.conf.txt
/usr/local/apache/conf/original/httpd.conf
/usr/share/system-config-httpd/httpd.conf.xsl

The one I compiled is located here:
/usr/local/apache/conf/httpd.conf

so I found out that for me to start it I had to run this:
/usr/local/apache/bin/httpd -k start



0
 

Author Closing Comment

by:Victor Kimura
ID: 34143337
Thank you all for your help.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question