Hmm, I am pretty suspicious of the config file
/etc/apache2/vhosts.d/30_subversion_ssl_vhost.conf
When you remove the '-D SSL' you will cause all parts of the configuration files that are enclosed in ... to be skipped. The default SSL vhost file on my Gentoo box is wrapped in that tag so I wonder if, by removing the '-D SSL', you are preventing the config in 30_subversion_ssl_vhost.conf from being run at all and if that is what is allowing Apache to start.
If you temporarily remove the file 30_subversion_ssl_vhost.conf from /etc/apache2/vhosts.d does Apache run? Are there any other SSL related vhost.conf files in vhosts.d? My reasonably fresh/unused Apache install's vhosts.d directory looks like this:
# pwd && ls
/etc/apache2/vhosts.d
00_default_ssl_vhost.conf 00_default_vhost.conf default_vhost.include
edit 1:
So much for that theory :) I am now wondering if the problem is with the Apache SSL setup itself. I apologize if I am covering ground you have already checked but I am wondering if you could do the following to help verify your Apache install.
On my Apache install with working SSL the use flags are as follows:
# emerge -av apache
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild U ] www-servers/apache-2.2.11-r2 [2.2.11] USE="ssl -debug -doc -ldap (-selinux) -sni -static -suexec -threads" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="-event -itk -peruser -prefork -worker" 64 kB
In particular do you have the 'ssl' USE flag set?
Also, could you use equery to verify the integrity of your apache2 install? If you do not have the equery command you can install it by running 'emerge -av gentoolkit'. The following command should verify the integrity of your apache install:
equery check apache
On my server the above command gives the following output:
[ Checking www-servers/apache-2.2.11 ]
!!! /etc/apache2/vhosts.d/00_default_ssl_vhost.conf has wrong mtime (is 1256620928, should be 1246793824)
!!! /etc/apache2/modules.d/00_default_settings.conf has wrong mtime (is 1246796304, should be 1246793824)
!!! /etc/conf.d/apache2 has incorrect md5sum
* 429 out of 432 files good
edit 2:
Well the install looks good to me, so much for theory 2. I am wondering if we can coax Apache into giving some more information on startup. In /etc/conf.d/apache2 if you change your APACHE2_OPTS line from:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE"
to
APACHE2_OPTS="-X -e debug -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE"
and then start Apache (/etc/init.d/apache2 start) the daemon should stay in the foreground (the -X flag) and output debuging messages as it starts (the -e debug option). Maybe this will give a clue as to why it is dying on startup.
You might be using the wrong PHP version :
Which version do I choose?
If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6
versions of PHP
So first make sure you're using VC6 (Thread safe) and check if that solves the problem, or alternatively remove your current apache, php and mysql and install Zend Server CE.
Best Answer
On Linux, this is usually due to high ThreadsPerChild + high or unlimited ulimit -s.
On Linux, the default stack size for each thread is ulimit -s value or 8-10 megabytes -- Apache needs about 512 kilobytes of stack space or less under normal use.
This quickly overruns either 32-bit address space size with TPC near 200+, or if you have system memory limits you can run afoul of them as well.
Set ulimit -s 512 in your "envvars" file shipped alongside apachectl -- note that ThreadStackSize does not help here because that sets a minimum.