Disabling Apache for good

mkniskanen

Verified User
Joined
Sep 17, 2008
Messages
80
Location
Lieksa, Finland
I have a 5+ years old DA production server which was started as an Apache one. I have now moved all sites from Apache to nginx, currently configuring the virtual servers using home-made scripts. No problem there. I used to have a setup where Apache was using port 80 and nginx 81 but a couple of months ago I setup nginx to port 80 and ditched apache (chkconfig httpd off or something alike).

Last night, however, httpd had been started and there being two httpd servers arguing about the ownership of the same port(s) I got some angry messages in the early hours of the morning. Stopping httpd, of course, helped. The only suspect so far is DirectAdmin, because I cannot think of anybody else.

Now, is there a way to tell Directadmin 1.46.2 not to start Apache ever again?
 
CustomBuild 2 since does have the ability to install, configure and manage nginx should do that automatically.

But if you didnt use CB maybe you wanna disable apache service in: /usr/local/directadmin/data/admin/services.status
Setting httpd=OFF

Regards
 
CustomBuild 2 since does have the ability to install, configure and manage nginx should do that automatically.
Setting httpd=OFF
Regards

I have done that a long time ago (late November, I think):

Code:
directadmin=ON
dovecot=ON
exim=ON
httpd=OFF
mysqld=ON
named=OFF
proftpd=ON
sshd=ON
Still, after checking the /var/log/directadmin/system.log I can see:

Code:
2015:01:16-00:11:01: httpd reloaded
....
2015:01:16-00:12:03: httpd restarted

This has happened twice in the past six weeks or so and I have frankly no idea what to do. Can I simply remove apache? Will renaming or removing /etc/init.d/httpd help?

And yes, I was using Custombuild before nginx became available. At the moment I have made so many manual nginx configurations that it is too risky to try to convert the production server to new Custombuild with nginx. Maybe the next server...
 
Last edited:
Well, i suppose you'd restarted DirectAdmin after that so maybe you should mail DA Staff to notice them this minor bug.

Yes, renaming /etc/init.d/httpd to /etc/init.d/httpd_stop should do the trick as workaround

Regards
 
Hello,

This has happened twice in the past six weeks or so and I have frankly no idea what to do. Can I simply remove apache? Will renaming or removing /etc/init.d/httpd help?

Directadmin still tries to restart/reload apache after running tally and logrotation. So you'd need to add

Code:
 exit 0;

into /etc/init.d/httpd instead of renaming it.

Follow this instructions written for named: http://help.directadmin.com/item.php?id=25 just keep in mind to replace named with httpd when modifying files.
 
CustomBuild 2 since does have the ability to install, configure and manage nginx should do that automatically.
But if you didnt use CB maybe you wanna disable apache service in: /usr/local/directadmin/data/admin/services.status
Setting httpd=OFF

That does nothing as long as we have httpd as the default.

And zEitEr: Thanks, that seems to be a solution. DA support told me to add

Code:
nginx=1

to the configuration file and it should stop httpd from loading as well. Funny how little documentation there is easily available about this...

I dug a bit deeper and it seems to me that I cannot jump into the Custombuild 2 bandwagon yet. I have my own settings for subdomains now looking like this:

Code:
home
    \acme
        \domains
                \acme.com
                         \config
                         \local
                         \public_html\
                         \sass

                \roadrunner.acme.com
                         \config
                         \local
                         \public_html
                         \sass

                \acme.co.uk
                         \config
                         \local
                         \public_html\
                         \sass

etc. and this would mean the need to adjust the default DA settings quite a bit. Time permitting I will have a look at it, though.

At the moment I use DA less and less, now mainly for user creation, statistics and email adminstration stuff.

EDIT: After re-reading the help page I understand that one may get the impression that httpd=OFF would do something. This is not the case, however.
 
Last edited:
Back
Top