Page 1 of 1

Apache SSL works only on localhost - v1.5pl1

PostPosted: 27. November 2005 20:51
by apmuthu
XAMPP v1.5pl1 for Windows installed on a Win2KSP4 machine with all updates and MS IE SP1+ in D:\MYSERVER\XAMPP folder.

Created an SSL certificate and CA self-signed.

Virtual Hosts are not working in ssl.conf with and without the
NameVirtualHost *:443

Virtual Hosts work correctly with and without the
NameVirtualHost *:80

The main ServerName is left at localhost:80.

For a valid www.domain.com, it would be nice to have entries for some subdomains enabled for SSL as example entries in the SSL.CONF file.
Created Private Key:
Code: Select all
openssl genrsa -out ca.key -rand $randomness_source 1024

Self-signed the root certificate:
Code: Select all
openssl req -new -x509 -days 3650 -config ca.conf -key ca.key -out ca.crt

Placed the key and crt in the appropriate cert folders in apache/conf.
Tried using the makecert.bat file also.

Any sample httpd.comf and ssl.conf files that address this problem?

PostPosted: 27. November 2005 20:56
by Wiedmann
Virtual Hosts are not working in ssl.conf with and without the
NameVirtualHost *:443

Please more specified.

And don't forget: You can't use SSL with namebased virtual hosts.

PostPosted: 28. November 2005 00:35
by WorldDrknss
You can use ssl with namebased virtualhost don't let anyone tell you that you can't. I have my own website to help beginners in setting all this up.

My website is www.worlddrknss.blogdns.org and you will find all the info you need in setting up your ssl with namebased virtualhost and you will be given examples. I also have my own forums, so if you aren't getting any help here, or you bs responses head over to my forum and I will be more than glad to help you out.

We cover how to setup:
XAMPP
Virtual Host
MercuryMail
FileZilla
SSL Certificates

PostPosted: 28. November 2005 01:11
by Wiedmann
You can use ssl with namebased virtualhost don't let anyone tell you that you can't.

No. It's not possible to make a valid namebased virtual host with a real certificate. Please read the Apache manual

PostPosted: 28. November 2005 02:26
by WorldDrknss
If I am right he is not trying to add a certificate to another VirtualHost he wants to use the certificate for a subdomain. He can easily use subdomain by using the *youdomain.com for commonName_defult. I am using NameBased VirtualHost as I am running three site, but only one uses a certificate.

I am using a certificate from cacert.
https://secure.thegamerslounge.blogdns.org

I do know that you cant add a certificate to more then one VirtualHost, but that wasnt what he was asking. I should have been more clear and said you can use them for subdomains but not for more than one VirtualHost.

Re: Only one Cert

PostPosted: 28. November 2005 07:26
by apmuthu
I observe that the following modules are natively compiled into Apache in XAMPP v1.5pl1:-

C:\ampp\apache\bin>apache -l
Compiled in modules:
core.c
mod_win32.c
mpm_winnt.c
http_core.c
mod_so.c

And that the following modules areDSO loaded by default:-

Default DSO modules:-

mod_access.so
mod_actions.so
mod_alias.so
mod_asis.so
mod_auth.so
mod_autoindex_color.so
mod_cgi.so
mod_dir.so
mod_env.so
mod_imap.so
mod_include.so
mod_info.so
mod_isapi.so
mod_log_config.so
mod_mime.so
mod_negotiation.so
# mod_rewrite.so
mod_setenvif.so
mod_ssl.so
mod_status.so

As we can see that only mod_ssl is loaded (and not OpenSSL) and that mod_rewrite is not enabled (by default), I am unable to get past https://localhost

I will check the other sites mentioned herein. Thanks anyway - very quick response on this board....

Re: WorldDrknss site

PostPosted: 28. November 2005 07:50
by apmuthu
I checked out the WorldDrknss site and found that it was what I did - on a real domain. I will check it out once again.

The downloads section of the WordDrknss site has a link for Linux that points to xampp-linux.tar.tar - should it not point to xampp-linux.tar.gz ?

If versions and file sizes were indicated at least in the text of the downloads, it would be nice.

Keep up the good work!

Re: SSL on Apache in XAMPP for Win

PostPosted: 28. November 2005 14:25
by apmuthu
Thanks a lot! I now a successful install of XAMPP with SSL. I had to declare the subdomain in the httpd.conf's VirtualHost section and just the main domain in the ssl.conf file. Also the idea of placing the localhost as the last VirtualHost entry is very clever!

The fastest response I ever got - and very concise and precise answers too! Thanks WorldDrknss.

PostPosted: 28. November 2005 21:16
by WorldDrknss
You correct it is tar.gz, I will fix that and add the filesize and version to the download section.

If you ever need anymore help just visit my site.