[solved] Keeping Apache really dead (not mostly dead)

theRKF

Well-Known Member
#1
We have a recurring problem where Apache keeps getting set to start on boot. This leads to a conflict between httpd and lsws whenever the server is rebooted.

We've used chkconfig to set httpd to "off", and even gone so far as to chmod /etc/init.d/httpd to 000.

I think the problem is that cPanel's scripts keep reviving Apache during their auto-upgrades.

I know this isn't specifically a LiteSpeed issue, but since everyone here has opted for LiteSpeed over Apache it's probably that someone has had to deal with this before, right?
 
Last edited by a moderator:

webizen

Well-Known Member
#2
You do not chkconfig httpd to 'off'. Instead, you still need it to be on.

What you should do is set below in LSWS Admin Console (Configuration => Server => General => Using Apache Configuration File)
Load Apache Configuration: Yes
Auto Reload On Changes: Use Apache binary wrapper
Apache Binary Path: /usr/local/apache/bin/httpd
 

theRKF

Well-Known Member
#3
Ok, thank you. I still had Auto Reload set to the deprecated (yes) option that was set when the LiteSpeed team first installed LSWS. Never changed it.

I've changed to your suggested settings and restarted LSWS.

The problem I'm trying to combat is that when the server starts up Apache starts serving sites instead of LiteSpeed, so I have to killall Apache and restart LSWS to get sites functioning properly.

Is there another setting I'm missing?
 

webizen

Well-Known Member
#4
Upon you changed to the suggested settings, a wrapper script should be created and replace apache binary. you can run following command to check. It should show it a script text instead of ELF executable. The actual Apache binary should be renamed to /usr/local/apache/bin/httpd_ls_bak.
# file /usr/local/apache/bin/httpd
/usr/local/apache/bin/httpd: POSIX shell script text executable

# file /usr/local/apache/bin/httpd_ls_bak
/usr/local/apache/bin/httpd_ls_bak: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
Use WHM plugin gui to switch to LSWS and then you should be ok ('service httpd restart' will bring up lsws instead of apache).
 

skooboy

Active Member
#6
You do not chkconfig httpd to 'off'. Instead, you still need it to be on.

What you should do is set below in LSWS Admin Console (Configuration => Server => General => Using Apache Configuration File)
Do I still need to execute these two commands if I do NOT want Apache to start when server is rebooted?

chkconfig httpd off
chkconfig lsws on

What else needs to be done to make sure LSWS is being monitored?

"service httpd" still points to Apache after applying those two commands above. I thought it should control lsws instead. Is it normal? Please clarify all the steps needed. Thank you.
 

NiteWave

Administrator
#7
>Do I still need to execute these two commands if I do NOT want Apache to start when server is rebooted?
shouldn't need. why do you play with these commands or why are you coming here ?

when you run WHM/cPanel auto installer, the script has taken care of these and others.

>"service httpd" still points to Apache after applying those two commands above. I thought it should control lsws instead. Is it normal?
please refer above #4 post, the answer is there.
 

skooboy

Active Member
#8
I did the installation from the command line and used the lsws admin console to set port offset to 0 to switch to Apache, at the end says to run the chkconfig httpd off. Do I still have to run the auto installer?
 
Top