# SSLCertificateFile: file '/etc/apache2/ssl/server.crt' does

## cwc

I get the following errors when I try to start apache

tma / # /etc/init.d/apache2 start

 * Caching service dependencies ...                                                        [ ok ]

 * apache2 has detected a syntax error in your configuration files:

Syntax error on line 35 of /etc/apache2/vhosts.d/00_default_ssl_vhost.conf:

SSLCertificateFile: file '/etc/apache2/ssl/server.crt' does not exist or is empty

I added the following use flags:

USE="-alsa -arts -cups -gnome -gtk -ldap -mpeg -opengl -qt -X -xv \

    apache2 curl dba exif expat gd imagemagick jpeg mysql pcre vhosts xml"

thanks,

cwc

----------

## tgR10

Syntax error on line 35 of /etc/apache2/vhosts.d/00_default_ssl_vhost.conf: 

check the syntax of that file on line 35 ...

for example

```
head -n 35 /etc/apache2/vhosts.d/00_default_ssl_vhost.conf |tail -n 1
```

duno sed or anythin but im pretty sure there is better way to do it :P

----------

## eruditas

You didn't make a certificate.

```
cd /etc/apache2/ssl
```

If it doesn't exist create it

```
mkdir /etc/apache2/ssl
```

Then make the certs:

```
openssl genrsa 2048 > server.key
```

```
openssl req -new -x509 -nodes -sha1 -days 365 -key server.key > server.crt
```

----------

## cwc

 *eruditas wrote:*   

> You didn't make a certificate.
> 
> ```
> cd /etc/apache2/ssl
> ```
> ...

 

Thata did it!  I ran open ssl and things work!

Now to the drawing board and I can learn more about ssl.

I'm the noob here.

----------

## cwc

 *cwc wrote:*   

>  *eruditas wrote:*   You didn't make a certificate.
> 
> ```
> cd /etc/apache2/ssl
> ```
> ...

 

----------

## toralf

Please be aware of a location change from /etc/apache2/ssl/ to /etc/ssl/apache2/

----------

