Solved: ssl not working on apache

Questions related to the Apache server
Post Reply
mister_v
Posts: 199
Joined: Thu Mar 04, 2010 9:19 pm

Solved: ssl not working on apache

Post 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.
Last edited by mister_v on Sun Apr 15, 2012 8:37 pm, edited 1 time in total.
chris
Site Admin
Posts: 205
Joined: Mon Jul 21, 2008 9:52 am

Re: ssl not working on apache

Post 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
mister_v
Posts: 199
Joined: Thu Mar 04, 2010 9:19 pm

Re: ssl not working on apache

Post by mister_v »

Thanks

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