/etc/init.d/apache2 startssl funzt nicht

Apache, Lighttpd, nginx, Cherokee
Post Reply
klaks
Posts: 16
Joined: 2003-04-11 19:21
 

/etc/init.d/apache2 startssl funzt nicht

Post by klaks »

Hallo,

mein Apache2 (Suse 9.0) startet mit

Code: Select all

/etc/init.d/apache2 startssl
zwar, aber nicht mit SSL (was er eigentlich tun müßte).
Hat jemand das selbe Phänomen? Weiß jemand eine Ursache??
Ich vermute mal einen Fehler in der
/etc/rc.d/rc5.d/K05apache2
Als Workaround habe ich die jetzt gändert, es klappt auch, ich bin aber unsicher, ob das so in Ordnung ist.

Code: Select all

case "$action" in
    start*)
	if [ -e $pidfile ]; then
	        $0 status &>/dev/null
		if [ $? = 1 ]; then
			case $APACHE_MODULES in *ssl*)
				echo "Found stale pidfile (unclean shutdown?). Running /usr/share/apache2/ssl_scache_cleanup"
				/usr/share/apache2/ssl_scache_cleanup
			esac
		fi
	fi
    
	echo -n "Starting httpd2 (${APACHE_MPM:-${apache_bin#*-}}) "
# Vorher:
   cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")   
# Jetzt:
   cmdline=$(echo $apache_bin -D SSL -f $httpd_conf $server_flags "$@")
So wird der Apache immer mit SSL gestartet.
Alternativ wäre natürlich auch folgender Code möglich - dann startet er auch nur bei der option startssl mit SSL:

Code: Select all

case "$action" in
    start*)
	if [ -e $pidfile ]; then
	        $0 status &>/dev/null
		if [ $? = 1 ]; then
			case $APACHE_MODULES in *ssl*)
				echo "Found stale pidfile (unclean shutdown?). Running /usr/share/apache2/ssl_scache_cleanup"
				/usr/share/apache2/ssl_scache_cleanup
			esac
		fi
	fi
   if [ $action = "startssl" ]; then
      sslopt="-D SSL"
   fi   
	echo -n "Starting httpd2 (${APACHE_MPM:-${apache_bin#*-}}) "
	cmdline=$(echo $apache_bin $sslopt -f $httpd_conf $server_flags "$@")
Ist das so in Ordnung oder gibt es dabei irgendein Problem?

Gruß
klaks
klaks
Posts: 16
Joined: 2003-04-11 19:21
 

Re: /etc/init.d/apache2 startssl funzt nicht

Post by klaks »

Hab jetzt den besseren Weg entdeckt:
(http://portal.suse.com/sdb/en/2003/01/a ... q.html#ssl)

in /etc/sysconfig/apache2
APACHE_SERVER_FLAGS="SSL"
Post Reply