Link to home
Start Free TrialLog in
Avatar of http:// thevpn.guru
http:// thevpn.guruFlag for Denmark

asked on

Troubleshooting SSL on Apache

Hi All
I am configuring SSL on an Apache2 server on Linux there are two files httpd.conf and ssl.conf httpd.conf inludes the following:

<IfModule mod_ssl.c>
    Include conf/ssl.conf
</IfModule>

And ssl.conf includes

Listen 443

<VirtualHost _default_:443>

#   General setup for the virtual host
DocumentRoot "/usr/local/apache2/htdocs"
ServerName www.server.net:443
ServerAdmin you@example.com
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log

I can access
http://www.myserver.net
but I can not access
https://www.myserver.net

Well the thing is that I did a nmap -sS localhost on the server and port 443 does not seem to be up however there are no relevant logs in /var/log/messages !!

What have I missed ?

Any help is appreciated.

Avatar of arrkerr1024
arrkerr1024
Flag of United States of America image

Check /usr/local/apache2/logs/error_log for errors.  There are a number of ssl specific lines missing, such as turning ssl on, loading the certificate, etc.

Where are your:
LoadModule ssl_module modules/mod_ssl.so
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile xxxx
SSLCertificateKeyFile xxxx
Avatar of http:// thevpn.guru

ASKER

Please note that i have not inluded all of the ssl.conf file
the error_log returns no errors.

All other options are included in the ssl.conf file, see below :


#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt

SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key


However thanks to your hint I noticed that the SSLCertificateFile and the SSLCertificateKeyFile do not exist how can I generate those ?

You can generate a self-signed certificate (will give you a warning when you access the page) or generate a request file and pay to have it signed by someone like godaddy.  You generate the certificates using the openssl program, but most linux distributions provide simple scripts to make it easier.

If you're on redhat take a look at:
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/s1-httpd-secure-server.html

To make your own you do:
mkdir /etc/httpd/ssl_certs
cd /etc/httpd/ssl_certs
openssl genrsa 1024 > server.key
chmod 400 server.key
openssl req -new -x509 -nodes -sha1 -days 365 -key host.key > server.crt
Thx for the help so far ,I added

LoadModule ssl_module modules/mod_ssl.so

Created the ssl.key and ssl.crt directories and copied the files respectively to those directories. After that I went to the /bin dir and did ./apachectl startssl but port 443 is still not listening.

Any ideas ?
ASKER CERTIFIED SOLUTION
Avatar of arrkerr1024
arrkerr1024
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry dudes nothing of the above really helped.