# Apache2 Problem [solved]

## insaan

Hi Folks,

I have emerged apache2 for PHP. Now when I start the apache server, I get the following error:

Syntax error on line 44 of /usr/lib/apache2/conf/modules.d/41_mod_ssl.default-vhost.conf:

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

Does someone know, which mistake I maight have done, plz?

cheersLast edited by insaan on Tue Nov 16, 2004 3:48 pm; edited 1 time in total

----------

## justanothergentoofanatic

You need to make the directory /etc/apache2/conf/ssl. They certificate should be in a file called server.crt while the key should be called server.key. The key should only be readable by root.

-Mike

----------

## insaan

Hallo Mike,

I have created a directory /etc/apache2/conf/ssl and then started apache2

#/etc/init.d/apache2 start

It gave the same errors, as mentioned above and looked the server.crt file in /usr/lib/apache2/conf/ssl/ and did not find, as it does not exist.

I found then "server.crt" file in

/usr/lib/apache2-mod_ssl/server.crt

and

/var/tmp/portage/server.crt

I copied 

#cp /usr/lib/apache2-mod_ssl/server.{crt,key} /usr/lib/apache2/conf/ssl/

Now I started apache2

#apache2 -k start

and got only one error:

apache2: could not open error log file /usr/lib/apache2/logs/error_log

I created logs in /usr/lib/apache2 and then it ran!! 

I think, it was not good emerged!!

Thanks for reply.

----------

## rbr28

Lots of problems with the 2.0.51-r1 ebuild.  

As mentioned in the other post, to get ssl to work I had to copy the server.key and server.crt from /var/tmp/portage to the location apache was looking for them in.  You can see this when it starts up, or check your logs.

Additionally I had numerous other errors about files or directories not existing.  I went through the logs and just created each directory that didn't exist and then everything worked fine.

----------

## insaan

 *insaan wrote:*   

> Hallo Mike,
> 
> I have created a directory /etc/apache2/conf/ssl and then started apache2
> 
> #/etc/init.d/apache2 start
> ...

 

----------

