# can't start apache

## hermes_jr

 *Quote:*   

> 
> 
> # /etc/init.d/apache2 start
> 
>  * Apache2 has detected a syntax error in your configuration files:
> ...

 

So, what can it be and how can I fix it?

----------

## hermes_jr

Nobody knows?   :Crying or Very sad:   Really, I'm not even sure that it's a big problem, maybe i missed something? Why cannot anyone help me  :Crying or Very sad: 

I can provide more info, just ask.

----------

## dvc5

Have you generated your certificate for ssl? If not then you can use the tools provided in /etc/ssl/misc/ to do so. Then just dump that server.crt in the folder usr/lib/apache2/conf/ssl/ to get rid of the error. You also might want to generate that certificate w/out a passphrase so apache doesn't ask for a passphrase when /etc/init.d/apache2 starts.

----------

## hermes_jr

I'm afraid it sounds stupid  :Embarassed: , but do I really need ssl? Never used it and I see this warning message first time. How can I disable ssl support in apache, or I shouldn't do it because of any security purposes?

----------

## dvc5

Disabling ssl in apache will not hurt your security. It is only used if you plan on using the https://... addresses for secure web sessions. For most cases, this is unnecessary. 

All you have to do is edit your /etc/conf.d/apache2 file and take out the "-D SSL" from the "APACHE_2 OPTS" line. Then your server will only listen on port 80.

----------

## hermes_jr

Ok. Thanks a lot.

/me have found a ton of docs and reading reading READING  :Laughing: 

----------

## airhead

Is it just me, or does there seem to be a problem with Apache 2.0.49 not generating SSL certs on install? It seems to run a program called "gentestcrt.sh" to generate the SSL cert, but it doesn't appear to put it in /etc/apache2/conf/ssl.

Can anyone help me to get an SSL cert working with my Apache setup?

Thanks

----------

## dvc5

 *airhead wrote:*   

> Is it just me, or does there seem to be a problem with Apache 2.0.49 not generating SSL certs on install? It seems to run a program called "gentestcrt.sh" to generate the SSL cert, but it doesn't appear to put it in /etc/apache2/conf/ssl.
> 
> Can anyone help me to get an SSL cert working with my Apache setup?
> 
> Thanks

 

The file you can run is:

```
sh /usr/portage/net-www/apache/files/2.0.40/gentestcrt.sh
```

This will generate a self-signed certificate and a key for your apache server in the current working directory called "server.crt" and "server.key". Just put these two files in /etc/apache2/conf/ssl. Also you can generate the certificate and key manually using the instructions here. Good Luck.

----------

## mallchin

Looks like an issue though, apache used to generate the certificate if ssl use flag was defined, now it isn't; sup with that?

----------

