Page 1 of 1

SSL

PostPosted: 03. November 2005 01:29
by nk430
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

PostPosted: 03. November 2005 02:46
by Wiedmann
SSL is enabled by default in XAMPP. So, what do you configure?

PostPosted: 05. November 2005 06:58
by nk430
Well when i type in https: it doesnt work

PostPosted: 06. November 2005 08:35
by tristanlee85
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?

PostPosted: 06. November 2005 12:04
by WorldDrknss
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.

PostPosted: 06. November 2005 21:27
by tristanlee85
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.

PostPosted: 07. November 2005 02:45
by WorldDrknss
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"

SSl

PostPosted: 07. November 2005 21:57
by nk430
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?

PostPosted: 07. November 2005 21:58
by nk430
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

PostPosted: 12. November 2005 02:05
by Foxy
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.