How to start the right instance of Apache on RedHat server

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to start the right instance of Apache on RedHat server
# 1  
Old 07-22-2009
How to start the right instance of Apache on RedHat server

Hi,

I have 2 apache instance on my machine (RedHat), and i need to start the "apache2" after any reboot but could not find the way ( searching into "httpd.conf" ), so i'am starting "apache2" manually.

After a reboot, none of them starts and when i when doing : httpd -k start, i got "apache" and not "apache2", so i stop "apache" with " http -k stop" than launch "apache2" with : /etc/init.d/httpd -k start !

can you help Smilie

may i should configure another file ?!Smilie
# 2  
Old 07-22-2009
When you invoke "http" you are probably actually invoking /usr/sbin/http.

When you invoke /etc/init.d/httpd you are invoking a startup script called httpd which resides in /etc/init.d and whcih reads its configuration values from /etc/sysconfig/httpd and then calls /usr/sbin/httpd with the OPTIONS string from /etc/sysconfig/httpd.

If you look at /etc/sysconfig/httpd I am sure that you will find that the OPTIONS line is not commented out and have been set to something or other. You also might find that the HTTPD line is uncommented to invoke the worker model.
# 3  
Old 07-23-2009
all the file lines are commented Smilie BUT a collegue of mine, while trying to help, set in one of the configuration files, related to "apache2" i guess, ( the one i want to use ), something so that when i run /etc/init.d/httpd it will calls "apache2" instance !!!

hope it helps to understand better the problem
--------

Further more :

the file "/usr/local/apache2/conf/httpd.conf" that is used once i start apache doing "/etc/init.d/httpd -k start" ( "httpd.conf" has the value "ServerRoot "/usr/local/apache2" ); so what i should probably do is to make the command "httpd -k start" perform this "/etc/init.d/httpd -k start" INSTEAD OF CALLING THE OTHER APACHE INSTANCE.

-------

THE QUESTION IS WHERE TO CONFIGURE THE VALUE "/etc/init.d/httpd" IN THE FILE "httpd.conf" i guess ( or maybe some where else ), THAT CALLS MY RIGHT "APACHE" ( I MEAN "/etc/init.d/httpd" )

Last edited by mehdi1973; 07-23-2009 at 05:35 AM..
# 4  
Old 07-23-2009
I am sorry but I can make absolutely no sense out of your last reply. Do you want two separate instances of apache to start on reboot or not?
# 5  
Old 07-24-2009
I would like to have ONLY one istance running on my server, i mean "apache2" on reboot, and it's the one i run, when launching the script "/etc/init.d/httpd".

Sorry for being not clear in the message i left before Smilie
# 6  
Old 07-28-2009
A web search for "apache multiple instances" will return many hits.

For example, have a look that this post Can a server has two instances of apache httpd running using two different config files?
# 7  
Old 07-29-2009
Thank you for Helping, but i think that i'll keep it open till someone give me an advice OR find it on my own.

I also changed the "/etc/sysconfig/httpd" file, uncommentin the Flag "OPTINS" and putting "OPTIONS=/etc/init.d/httpd -k start", but still it doesn't work after rebooting the machine !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

Unable to start the apache web server

Hi All, I'm getting this below error bash-4.1$ ./apachectl -k start (98)Address already in use: make_sock: could not bind to address hostname:18000 no listening sockets available, shutting down Unable to open logs I tried to change the port number, still same error: ... (5 Replies)
Discussion started by: raghur77
5 Replies

2. Red Hat

Redhat Apache

How is it possible to tied a IP address to folder in apache, so when someone put the ip in there browser they land in that folder? (3 Replies)
Discussion started by: da2013
3 Replies

3. UNIX for Advanced & Expert Users

Apache does not start

After i added this line to my apache httpd.conf it does not start. AuthUserFile /apps/apache22/conf/httpd.passwd and i see the below error. Syntax error on line 876 of /apps/apache22/conf/httpd.conf: AuthUserFile not allowed here Kindly help. (4 Replies)
Discussion started by: mohtashims
4 Replies

4. UNIX for Advanced & Expert Users

start instance via GUI

do you have any recommendation on how to restart instances of several servers via GUI? a. serverA: tomcat b. serverB: glassfish etc etc I already gave remote script but im thinking of other alternatives though pls help. thanks (0 Replies)
Discussion started by: lhareigh890
0 Replies

5. UNIX for Advanced & Expert Users

script to remotely start an application instance

just wanted to ask if anybody have script template for the subject above so I can make ti as my guide? example a. server 1.1.1.1: restart script located at /etc/init.d/glassfish.sh b. server 2.2.2.2: central script that support admin will use to execute to restart the /etc/init.d/glassfish.sh... (0 Replies)
Discussion started by: lhareigh890
0 Replies

6. UNIX for Dummies Questions & Answers

Maximum Number of Virtual Hosts per Apache instance

Is there a directive to limit the number of virtual hosts allowed per apache instance? I am told yes but I cannot find it. (1 Reply)
Discussion started by: mojoman
1 Replies

7. Red Hat

Apache instance

Hi , Maximum How many instances of apache can we run in one box? (2 Replies)
Discussion started by: krish4linux
2 Replies

8. Red Hat

X Server won't start (Redhat 9) HELP

im running rh 9 on my vmware, i tryed changing the graphics card mode to resize the desktop, after restarting i get a message X Server cannot start. then it takes me to the consol screen to log on, "im new to using linux as of last night" It would be helpfull if anyone can help me resolve... (4 Replies)
Discussion started by: aoteg
4 Replies

9. Solaris

help me........... my apache can't start

help me please.................bro i was install apache2 and i have been configure httpd.conf on my solaris 10 machine n i already running my httd service but why my webserver couldn't run on my browser? some buddy help me.............:confused::confused::confused::confused::confused: (5 Replies)
Discussion started by: yatmianto
5 Replies

10. UNIX for Dummies Questions & Answers

redhat 6.2 : Apache + PHP4

Hello, how are you all , I am having a hard time here I've got my Linux Redhat 6.2 server , with pre-instalation of redhat. anyway , I installed mysql (not rpm) and its working very well, but I faced lot of trouple with PHP4. Apache 1.1.12 was installed through rpm package and I updated... (1 Reply)
Discussion started by: t_zone
1 Replies
Login or Register to Ask a Question