LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

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

Rep: Reputation: 0
Apache + mod_ssl + virtualhosts problems


Hi,

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
</IfModule>
LoadModule ssl_module /usr/lib/apache/1.3/mod_ssl.so
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>
<VirtualHost www.mydomain.dom:443>
ServerName webmail.mydomain.net
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
</IfModule>
DocumentRoot /usr/share/squirrelmail
ErrorLog /var/log/apache/webmail.mydomain.dom-error.log
CustomLog /var/log/apache/webmail.mydomain.dom-access.log common
</VirtualHost>
#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, 01:48 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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


Reply


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


All times are GMT -5. The time now is 08:15 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration