SSL

Problems with the Windows version of XAMPP, questions, comments, and anything related.

SSL

Postby nk430 » 03. November 2005 01:29

I have the latest version of xampp, not beta, but the other.
I want to enable SSL for this domain.

I have everything I need, but I followed the instruction on other threads, then apache wouldn't start. I tried, over 50 times to try to get this configuration to work.

Whenever I try to connect via https it says. Connection terminated. Some information may have been transmitted.

I hope everyone can help, I have a few months of xampp experience, but have never enabled ssl on apache or xampp.

Please help

Thanks
nk430
 
Posts: 4
Joined: 02. November 2005 23:26

Postby Wiedmann » 03. November 2005 02:46

SSL is enabled by default in XAMPP. So, what do you configure?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby nk430 » 05. November 2005 06:58

Well when i type in https: it doesnt work
nk430
 
Posts: 4
Joined: 02. November 2005 23:26

Postby tristanlee85 » 06. November 2005 08:35

My SSL works locally, but when my friends try to access it, they get "Access forbidden!!!." My shopping cart software can't even find SSL, but when I type in 'https://' it works for me. Any ideas?
tristanlee85
 
Posts: 11
Joined: 15. October 2005 08:16
Location: Columbus, OH

Postby WorldDrknss » 06. November 2005 12:04

add the following to the end of ssl.conf and edit occording to your website.

Code: Select all
NameVirtualHost *:443
<VirtualHost *:443>
    DocumentRoot C:/www/thegamerslounge
    ServerName secure.thegamerslounge.game-host.org
    ServerAlias www.secure.thegamerslounge.game-host.org
    SSLEngine on
    SSLCertificateFile "C:/xampp/xampp/apache/conf/ssl.crt/thegamerslounge.crt"
    SSLCertificateKeyFile "C:/xampp/xampp/apache/conf/ssl.key/thegamerslounge.key"
</VirtualHost>


And use the following to create your own CA signed certificate

Create private key

openssl genrsa -out ca.key -rand $randomness_source 1024
chmod 400 ca.key

Setup the config file for the new CA

Create a new file called ca.conf and copy the following code into it

[ req ]
default_bits = 1024
default_keyfile = ca.key
distinguished_name = req_distinguished_name
x509_extensions = v3_ca
req_extensions = v3_req
string_mask = nombstr

[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = **
countryName_min = 2
countryName_max = 2
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = ****
localityName = Locality Name (e.g., city)
localityName_default = ****
organizationName = Organization Name (e.g., company)
organizationName_default = ****
organizationalUnitName = Organizational Unit Name (e.g., section)
organizationalUnitName_default = Certification Services Division
commonName = My company's Root CA
commonName_default = ****
commonName_max = 64
emailAddress = E-mail address
emailAddress_default = ****
emailAddress_max = 40

[ v3_ca ]
basicConstraints = critical,CA:true
subjectKeyIdentifier = hash

[ v3_req ]
nsCertType = objsign,email,server


Replace the stars with information pertaining to your setup

Self sign the root certificate

openssl req -new -x509 -days 3650 -config ca.conf -key ca.key -out ca.crt
The root certificate will be valid for 10 years (-days 3650).
Install the resulting .crt file in browser
On Windows you can just click on the file and you will have the option to import the certificate.
Congratulations. You now have a certification authority certificate.
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby tristanlee85 » 06. November 2005 21:27

Alright. I did that. Now Apaahce won't start. Here is my ssl.conf:

Code: Select all
NameVirtualHost *:443
<VirtualHost *:443>
    DocumentRoot "C:/Program Files/xampp/htdocs"
    ServerName [my ip]:443
    ServerAlias [my ip]
    SSLEngine on
    SSLCertificateFile "C:/Program Files/xampp/apache/conf/ssl.crt/ca.crt"
    SSLCertificateKeyFile "C:/Program Files/xampp/apache/conf/ssl.key/ca.key"
</VirtualHost>


As soon as I click to start Apache, it'll start, and then shut right down.
tristanlee85
 
Posts: 11
Joined: 15. October 2005 08:16
Location: Columbus, OH

Postby WorldDrknss » 07. November 2005 02:45

Apche doesn't work with names that have spaces in them like "C:/Program Files/xampp/htdocs" thats why it recommend that you install XAMPP in C:\xamp and your web contents in C:\www\. You can try to add %20 and see if that works. "C:/Program%20Files/xampp/htdocs"
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

SSl

Postby nk430 » 07. November 2005 21:57

I run my webserver from home on port 8080 because my isp doesn't allow webhosting on port 80.

How can I integrate all of these instructions with my configuration being on port 8080?

my domain can be reached at www2.domain.com:8080

I am trying to setup ssl on www2.domain.com

How can i do this?
nk430
 
Posts: 4
Joined: 02. November 2005 23:26

Postby nk430 » 07. November 2005 21:58

I followed all of the instructions above but did not add anything to my ssl.conf because i do not know the syntax for my server because i host on port 8080.

My xampp directory is c:/xampp/xampp/htdocs
nk430
 
Posts: 4
Joined: 02. November 2005 23:26

Postby Foxy » 12. November 2005 02:05

Name your certificate as (server) on both. The .key & The .crt. And import server.crt into your conf/ssl.crt folder and .key into your conf/ssl.key.
Foxy
 
Posts: 37
Joined: 08. November 2005 21:18


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 83 guests