When I run # /etc/init.d/apache2 restart It happily claims to have started the program, but hasn't actually done so. The output goes a little something like this.
www ~ # /etc/init.d/apache2 restart
* Stopping apache2 ... [Sun Oct 25 23:50:38 2009] [warn] Useless use of AllowOverride in line 63 of /etc/apache2/vhosts.d/30_subversion_ssl_vhost.conf. [Sun Oct 25 23:50:38 2009] [warn] NameVirtualHost --removed--:443 has no VirtualHosts [Sun Oct 25 23:50:38 2009] [warn] NameVirtualHost --removed1--:8443 has no VirtualHosts httpd (no pid file) not running [ ok ] * Starting apache2 ... [Sun Oct 25 23:50:38 2009] [warn] Useless use of AllowOverride in line 63 of /et c/apache2/vhosts.d/30_subversion_ssl_vhost.conf. [Sun Oct 25 23:50:38 2009] [warn] NameVirtualHost --removed--:443 has no VirtualHosts [Sun Oct 25 23:50:38 2009] [warn] NameVirtualHost --removed1--:8443 has no VirtualHosts [ ok ]
As you can see, no httpd process was ever running, despite claiming to have started before, as it does once again here. Verifying by hand, /var/run/apache2/apache2.pid doesn't exist. The run/apache2/ directory wasn't even there before I added and chowned it by hand. Nothing is appended to /var/log/apache2/error_log, nor to any of the domain specific logs for any of my vhosts.
However, running with the --verbose and --debug options, it does seem to get hung up on a for loop involving the location /var/run/apache2/apache2.pid
+ i=0
+ '[' '!' -e /var/run/apache2.pid ']'
+ '[' 0 -lt 10 ']'
+ sleep 1
++ expr 0 + 1
+ i=1
+ '[' '!' -e /var/run/apache2.pid ']'
+ '[' 1 -lt 10 ']'
+ sleep 1
++ expr 1 + 1
...
I'm running apache 2.2 on the latest build of Gentoo Linux. The vhosts.d config files have been imported from a previous setup, fyi, but the httpd.conf and associated files are all brand new.
edit: on further investigation, the apache2 init script calls
/usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST \If I remove the -D SSL part, the pid creates itself fine... however, I would like ssl... any ideas?
-D LANGUAGE -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start
edit2:
start() {
checkconfig || return 1
[ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache
ebegin "Starting ${SVCNAME}"
${APACHE2} ${APACHE2_OPTS} -k start
i=0
while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
sleep 1 && i=$(expr $i + 1)
done
test $i -le ${TIMEOUT}
eend $?
}
If this provides any further insight, let me know
edit3:
if, in my ssl vhosts, i comment out SSLEngine on
, apache successfully starts...
edit4:
Just a look at my apache build options
www ~ # emerge -av apache These are the packages that would be merged, in order: Calculating dependencies |... done! [ebuild R ] www-servers/apache-2.2.11-r2 USE="sni ssl -debug -doc -ldap (-s elinux) -static -suexec -threads" APACHE2_MODULES="actions alias asis auth_diges t authz_host autoindex cache dav deflate dir env expires filter headers include info log_config logio mime negotiation proxy rewrite setenvif speling status use rdir usertrack -auth_basic -authn_alias -authn_anon -authn_dbd -authn_dbm -authn _default -authn_file -authz_dbm -authz_default -authz_groupfile -authz_owner -au thz_user -cern_meta -charset_lite -dav_fs -dav_lock -dbd -disk_cache -dumpio -ex t_filter -file_cache -ident -imagemap -log_forensic -mem_cache -mime_magic -prox y_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -unique_ id -version -vhost_alias" APACHE2_MPMS="-event -itk -peruser -prefork -worker" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB Would you like to merge these packages? [Yes/No]
And also verifying checksums
www ~ # equery check apache [ Checking www-servers/apache-2.2.11-r2 ] !!! /etc/apache2/vhosts.d/00_default_vhost.conf has incorrect md5sum !!! /etc/conf.d/apache2 has incorrect md5sum !!! /etc/apache2/vhosts.d/00_default_ssl_vhost.conf has incorrect md5sum * 403 out of 406 files good
edit5:
Woo! Edit 5!
Startup output after changing the corresponding line in /etc/conf.d/apache2
to
APACHE2_OPTS="-X -e debug -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5
* Starting apache2 ... [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module actions_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module alias_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module asis_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module authz_host_modul e [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module autoindex_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module cgi_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module deflate_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module dir_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module env_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module expires_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module filter_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module headers_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module include_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module info_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module log_config_modul e [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module logio_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module mime_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module negotiation_modu le [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module rewrite_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module setenvif_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module speling_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module ssl_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module usertrack_module [Tue Oct 27 23:15:19 2009] [debug] mod_so.c(246): loaded module php5_mod [ ok ]
No hints yet. Also, not sure how to verify ssl config, if that is, indeed, the problem
/etc/init.d/<initscript> stop && /etc/init.d/<initscript> start
because I've had bad experiences withrestart
. However, this more appears to be a configs issue