LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 04-05-2006, 08:34 PM   #1
jstrahm
LQ Newbie
 
Registered: Sep 2005
Location: Fort Wayne, Indiana
Distribution: debian, SuSE
Posts: 4

Rep: Reputation: 0
Configuring SSL on Apache2


Hello,

I am somewhat new to SLES 9 and Apache2. I need to set up an https site on our SLES 9 server runing Apache2.

I have done alot of research on the problem I am having to no avail, so I am looking for help.

Apache2 is runing fine on our Server. I added a virtual host and it works fine. Now I need to make this site under https. Here is what I have done.

I made mod_ssl a loadable module for Apache2

In /etc/sysconfig/apache2 I added:
APACHE_SERVER_APACHE_SERVER_FLAGS="-D SSL"

In /etc/apache2/listen.conf
<IfDefine SSL>
<IfDefine !NOSSL>
<IfModule mod_ssl.c>
Listen :443
</IfModule>
</IfDefine>
</IfDefine>

NameVirtualHost 192.168.97.40:443
NameVirtualHost 192.168.97.40:80

Listen 443
Listen 80


I created my private key with openssl
I created my certificate request with openssl
I then downloaded a free trial cert from Entrust

I set up my virutal host file:
<IfDefine SSL>
<IfDefine !NOSSL>
<VirtualHost 192.168.97.40:443>
DocumentRoot "/srv/www/htdocs/web/share"
ServerName [my domain name]:443
ServerAdmin [my email address]
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl.crt/cert.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/server.key

<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>

<Directory "/srv/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>

SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

CustomLog /var/log/apache2/ssl_request_log ssl_combined

</VirtualHost>
</IfDefine>
</IfDefine>

When I run the command:
rcapache2 start

I get the following error message:

Starting httpd2 (prefork) [Wed Apr 05 21:26:39 2006] [warn] NameVirtualHost 192.168.97.40:0 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:443
no listening sockets available, shutting down
Unable to open logs
startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1

I then executed the command to see what process was using port 443:

netstat -pan | grep ":443"

I get nothing back.

I am stumped. Can anyone help me or point me in the right direction?

Your help is greatly apprecitated.
Thank You
Joe
 
Old 04-06-2006, 08:37 AM   #2
jstrahm
LQ Newbie
 
Registered: Sep 2005
Location: Fort Wayne, Indiana
Distribution: debian, SuSE
Posts: 4

Original Poster
Rep: Reputation: 0
I Got It Working

I guess a good night sleep sometimes helps...

I removed:
<IfDefine SSL>
<IfDefine !NOSSL>
<IfModule mod_ssl.c>
Listen :443
</IfModule>
</IfDefine>
</IfDefine>

from listen.conf

then I got apache to start and listen on Port 443:

Then I figured out I had a bad certificate.

Its working fine now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache2 - ssl : connection via ssl interrupted ldp Linux - Software 0 10-02-2005 09:07 AM
Apache2 and SSL problems Malibyte Linux - Software 1 07-09-2005 04:14 PM
compiling apache2 with SSL devfreak Linux - Software 1 05-22-2005 11:18 AM
Apache2, SSL, HTTPS... KneeLess Debian 3 09-02-2004 09:44 PM
Apache2 + SSL for the first time ridertech Linux - Newbie 0 02-14-2004 03:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 04:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration