I use /etc/init.d/apache2 startssl to start apache with SSL. How do I restart this service? I don’t want to do a complete start and stop. If I do restart, it only listens on port 80 and not 443. I tried to put Listen 443 in /etc/apache2/listen.conf file and when I did a /etc/init.d/apache2 startssl it exit with an error: 443 address is already listening. But nothing was listening on that port.
startssl merely adds -DSSL to the start options, same as it would if you had added SSL to APACHE_SERVER_FLAGS. You might as well put SSL there to not have to depend on startssl, which will not be called by the boot sequence. You still have to configure SSL in the normal way, which means adding Listen 443, creating a cert and key, and so forth.
as ken_yap suggested I would prefer to edit /etc/sysconfig/apache2 and add SSL to the APACHE_SERVER_FLAGS instead of writing an own script. The config specified at /etc/sysconfig/apache2 is evaluated at apache2 start so that it is not necessary to create an own script.