Page 1 of 1

Solved: ssl not working on apache

Posted: Sun Apr 08, 2012 1:15 pm
by mister_v
Hello,

I did setup ssl on apache,
but it is not working.
When I connect to the port,
I get the following error message

Code: Select all

curl -k --head https://localhost:10443
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
the port 10443 is listening for apache.
Checked it with:

Code: Select all

sudo netstat -lnp
Anyone has ideas what could be wrong.

Re: ssl not working on apache

Posted: Mon Apr 09, 2012 11:03 am
by chris
Usually it means there are still some settings wrong with your apache configuration.

Make sure all the port is set :
Listen 10443
But also
NameVirtualHost *:10443
and
<VirtualHost *:10443>

you can find the settings in /etc/apache2/httpd.conf
or for virtual hosts /etc/apache2/vhosts.d/0x_yoursite.conf

don't forget to start apache with ssl support
in /etc/conf.d/apache2

Code: Select all

APACHE2_OPTS=" -D SSL -D YOURSITE"
don't forget to restart apache.

Code: Select all

/etc/init.d/apache2 restart
and of course apache needs to be compiled with ssl support. (should be ok)

These are the most common mistakes.
If it still doesn't work, post some of your configuration files.
Then we can check.

You can get more info about your connection, with openssl:

Code: Select all

openssl s_client -state -connect localhost:10443

Re: ssl not working on apache

Posted: Sun Apr 15, 2012 8:37 pm
by mister_v
Thanks

I found the problem.
I forgot to add -D SSL in /etc/conf.d/apache2
APACHE2_OPTS=" -D SSL "