Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-26-2003, 07:25 AM   #1
LQ Newbie
Registered: Dec 2002
Location: Brussels, Belgium
Distribution: Debian
Posts: 9

Rep: Reputation: 0
Apache + mod_ssl + virtualhosts problems


I have some troubles running SSL over http on a virtual host.
The webserver is apache, running on Debian Woody.

The problem is simple : all virtual hosts work properly with http. I want squirrelmail (it uses webmail.mydomain.dom - i've just replaced my real domain name with a dummy one) to use both http and https. But when I try to access to it, my browser tells me The connection was refused when attempting to contact webmail.mydomain.dom

Here is a snippet of my configuration file (httpd.conf):

<IfModule mod_ssl.c>
Listen 80
Listen 443
LoadModule ssl_module /usr/lib/apache/1.3/
NameVirtualHost www.mydomain.dom
NameVirtualHost www.mydomain.dom:443
<VirtualHost www.mydomain.dom>
ServerName webmail.mydomain.dom
ServerAlias webmail.mydomain.*
Include /etc/squirrelmail/apache.conf
DocumentRoot /usr/share/squirrelmail
ErrorLog /var/log/apache/webmail.mydomain.dom-error.log
CustomLog /var/log/apache/webmail.mydomain.dom-access.log common
<VirtualHost www.mydomain.dom:443>
ServerAlias webmail.mydomain.*
Port 443
Include /etc/squirrelmail/apache.conf
<IfModule mod_ssl.c>
SSLEngine On
SSLCertificateFile /etc/apache/ssl/my-server.cert
SSLCertificateKeyFile /etc/apache/ssl/my-server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
DocumentRoot /usr/share/squirrelmail
ErrorLog /var/log/apache/webmail.mydomain.dom-error.log
CustomLog /var/log/apache/webmail.mydomain.dom-access.log common
#End _______________________________________________________

(It's only a tiny snippet of my httpd.conf file, if you want to have the entire file, i can paste it, but it's very long)

I've created the /etc/apache/ssl/my-server.cert and /etc/apache/ssl/my-server.cert with these commands :
openssl req -config openssl.cnf -new -out my-server.csr
openssl rsa -in privkey.pem -out my-server.key
openssl x509 -in my-server.csr -out my-server.cert -req -signkey

Can anyone help me ?
Old 11-26-2003, 12:48 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Is apache listening on both ports? Post the output of:
netstat -nlp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache VirtualHosts and VSFTPd critical Linux - Software 3 09-14-2005 02:12 PM
Trying to make mod_ssl work - virtualhosts make trouble Belize Linux - Software 0 02-26-2005 08:30 PM
Apache VirtualHosts Problem stratisphere Linux - Newbie 4 11-27-2004 12:20 AM
VirtualHosts & apache 2.0.48 TiCkO Linux - Networking 2 07-13-2004 03:20 PM
Virtualhosts in apache. where am i going wrong. SSBN Linux - Networking 20 07-11-2003 04:02 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:05 PM.

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