# SSL stopped working on Apache2

## g4j

Hello, not long ago I did a minor Apache2 upgrade as part of an emerge -u world. Made the normal edits in the /etc/apache2/httpd.conf and /etc/conf.d/apachet files to get things back to normal. Got PHP working again, but SSL is dead.  The /etc/conf.d/apache2 file includes the line:

```
APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D USERDIR -D PHP5"
```

I'm not sure what I need to do to bring SSL back to life.

Any help would be appreciated.

----------

## smerf

what do you mean - 'dead'?

----------

## Shopro

A look at your error_log might brighten up things more.

----------

## g4j

By "dead" I mean SSL simply isn't working. I don't think it's started, and I'm not sure how to change that.

When I point FireFox to https://localhost I receive a popup saying: "Connection to the host has terminated unexpectedly. Some data may have been transfered." The result of this in the error log is as follows:

```
 /var/log/apache2 $ tail error_log

[Tue Mar 07 09:11:52 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)

[Tue Mar 07 09:11:52 2006] [notice] Digest: generating secret for digest authentication ...

[Tue Mar 07 09:11:52 2006] [notice] Digest: done

[Tue Mar 07 09:11:53 2006] [notice] Apache configured -- resuming normal operations

[Tue Mar 07 09:20:44 2006] [error] [client 10.10.72.58] File does not exist: /var/www/localhost/htdocs/favicon.ico

[Tue Mar 07 09:20:44 2006] [error] [client 10.10.72.58] File does not exist: /var/www/localhost/htdocs/favicon.ico

[Tue Mar 07 09:33:45 2006] [error] [client 127.0.0.1] Invalid method in request \x80[\x01\x03\x01

[Tue Mar 07 09:33:45 2006] [error] [client 127.0.0.1] Invalid method in request \x80[\x01\x03

[Tue Mar 07 09:33:53 2006] [error] [client 127.0.0.1] Invalid method in request \x80[\x01\x03

[Tue Mar 07 09:56:19 2006] [error] [client 127.0.0.1] Invalid method in request \x80[\x01\x03
```

Thanks for your help.

----------

## Shopro

Try adding this to your /etc/conf.d/apache2

```
-D SSL_DEFAULT_VHOST
```

----------

## g4j

Thanks Shopro! Adding "-D SSL_DEFAULT_VHOST" to the APACHE2_OPTS line did the trick.  SSL is once again working.

----------

