ap2 / mod_php, bare minimum configuration

sde

Verified User
Joined
Sep 11, 2004
Messages
214
Location
Temecula, CA
Does DA itself need any of the modules defined in the default ap2 config? I want to remove a bunch of modules for this single site server install that doesn't need all that, but I wanted to ask before I start removing items from the config.

The site on this server is a busy vbulletin forum and I'm just trying to optimize for performance. Not interested in running cgi because of the potential security issues of a PHP injection being able to write over any file.

Any other performance insight in terms of apache would be appreciated.

Here's the default ap2 config.

Code:
#!/bin/sh
"./configure" \
        "--prefix=/etc/httpd" \
        "--exec-prefix=/etc/httpd" \
        "--bindir=/usr/bin" \
        "--sbindir=/usr/sbin" \
        "--sysconfdir=/etc/httpd/conf" \
        "--enable-so" \
        "--enable-dav" \
        "--enable-dav-fs" \
        "--enable-dav-lock" \
        "--enable-suexec" \
        "--enable-deflate" \
        "--enable-unique-id" \
        "--with-suexec-caller=apache" \
        "--with-suexec-docroot=/" \
        "--with-suexec-gidmin=100" \
        "--with-suexec-logfile=/var/log/httpd/suexec_log" \
        "--with-suexec-uidmin=100" \
        "--with-suexec-userdir=public_html" \
        "--with-suexec-bin=/usr/sbin/suexec" \
        "--with-included-apr" \
        "--with-pcre=/usr/local" \
        "--includedir=/usr/include/apache" \
        "--libexecdir=/usr/lib/apache" \
        "--datadir=/var/www" \
        "--localstatedir=/var" \
        "--enable-logio" \
        "--enable-ssl" \
        "--enable-rewrite" \
        "--enable-proxy" \
        "--enable-expires" \
        "--with-ssl=/usr" \
        "--enable-headers"
 
I don't think that directadmin by itself depends on apache anyhow. But if you disable that or this module you should make sure that your apache configs does not contain uncommented directives of the disabled module, as it will make impossible to start apache.

Mod proxy, mod expires, ssl, logio, suexec, dav can be disable, but keep in mind you'll need to update apache templates (/usr/local/directadmin/data/templates) and configs (/etc/httpd/conf/).
 
Thanks for the info, it's much appreciated.

Just some notes for others looking at this...

I did get this error when restarting apache because of logio being disabled. I just enabled and recompiled and it was fine.

Code:
Starting httpd: Syntax error on line 5 of /etc/httpd/conf/ips.conf:
Unrecognized LogFormat directive %0

Also, even though I modified the conf files in the custom build directory, they did not overwrite httpd.conf or the user httpd.conf. I had to disable them also manually in /etc/httpd/conf.
 
Back
Top