Click to See Complete Forum and Search --> : two apaches - but the wrong one is running!
cmrick23
09-20-2002, 12:46 PM
I reinstalled Apache last night because I couldn't get apache/php/mysql combo to work. I also reinstalled PHP and mysql.
Now I have two Apaches. The one that starts up when the server boots up is the old one. I would like to start up the new one instead.
I have been looking at the rc3.d directory wondering if I should change the S15httpd file to point to the new httpd? Is editing this file the way to go (I see a bunch of path references in it), or should I nuke this file and create a new one? Or...?
Also, how should I remove the old Apache (the one that came with Red Hat?
I would really appreciate some help!
Thanks,
Craig
Supa' Penguin
09-20-2002, 02:44 PM
firstly when u installed the new apache did you install from source(*.tar.gz)?
For removing the old apache is a snap with rpm -e
just list your installed apache pkgs with rpm -qa | grep -i apache*
and remove apache-<ver #> and the development pkgs for that version
mychl
09-20-2002, 02:48 PM
Take a look at /etc/init.d/httpd and see what that is calling. That is the script that /etc/rc.d/rc3.d/S??httpd is pointing to anyway.
From that script you might be able to edit it to call the new apache.... but uninstalling the old one is a good idea too.
Good Luck
Supa' Penguin
09-20-2002, 02:51 PM
How are you starting the new apache?
You could add this to your rc.local this would ensure that all interfaces and filesystems are available for your daemon.
Why are you not happy with the RH apache config?
cmrick23
09-20-2002, 03:24 PM
The PHP module that came with the RH Apache config was not configured for mySQL, and I had no idea how to re-configure it for mySQL. Plus, I wanted a more standard installation of Apache (paths, etc) to learn with.
Before I saw all of the posts to my message, I uninstalled both Apaches (with rpm -e) and started over with Apache and PHP. Both were installed from source.
Now that I've reinstalled I don't have a httpd in /etc/init.d/ ?
The S15httpd file in rc3.d is gone now.
Do you recommend putting an entry in rc.local? Can you tell me what the entry in rc.local would look like?
Or should this be done in /etc/rc3.d in a file similar to S15httpd that was there before?
Thank you very much!
--Craig
Supa' Penguin
09-20-2002, 03:47 PM
personally I would add this to your rc.local like:
<path/to/apache/bin/>httpd
with this you have the ability to bind the daemon to different interfaces at boot-up (ie. different apache.conf(s) for ip aliases) like:
<path/to/apache/bin/>httpd -f <path/to/apache/conf/>apache.conf
also available and somewhat easier is the supplied script (from apache source dist.) used like:
apachectl start (or stop)
cmrick23
09-20-2002, 03:56 PM
I went the easier route and used apachectl in rc.local, and that worked fine.
Thank you. Have a good weekend!
--Craig :)
Supa' Penguin
09-20-2002, 03:58 PM
My pleasure
Have a great one too!
J.