Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: adding ssl to vhosts |
|
Author |
|
Virsacer

Joined: 16 Jan 2010 Posts: 108 Location: Germany, Darmstadt
|
Posted: Wed 27 Jan '10 2:36 Post subject: adding ssl to vhosts |
|
|
Im having difficulties adding ssl to 2 vhosts.
Before: Code: | <VirtualHost *>
DocumentRoot "C:/Eigene Dateien/Internet/HTML"
</VirtualHost>
<VirtualHost *>
ServerName test.tld
ServerAlias www.test.tld
DocumentRoot "C:/Eigene Dateien/Internet/TEST"
</VirtualHost> |
After: Code: | NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
DocumentRoot "C:/Eigene Dateien/Internet/HTML"
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "C:/Eigene Dateien/Internet/HTML"
SSLEngine On
SSLCertificateFile conf/ssl.crt
SSLCertificateKeyFile conf/ssl.key
</VirtualHost>
<VirtualHost *:80>
ServerName test.tld
ServerAlias www.test.tld
DocumentRoot "C:/Eigene Dateien/Internet/TEST"
</VirtualHost>
<VirtualHost *:443>
ServerName test.tld
ServerAlias www.test.tld
DocumentRoot "C:/Eigene Dateien/Internet/TEST"
SSLEngine On
SSLCertificateFile conf/ssl.crt
SSLCertificateKeyFile conf/ssl.key
</VirtualHost> |
Result:
127.0.0.1 and localhost work fine with http and https
test.tld and www.test.tld do not work at all... |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7407 Location: EU, Germany, Next to Hamburg
|
Posted: Wed 27 Jan '10 11:24 Post subject: |
|
|
Your SSL setup is ok. The thing about your vhost ist that windows can't resolve the name to an IP.
You so might edit your hosts file in windows\system32\drivers\etc
there should be the line
127.0.0.1 localhost
after it add (each new line)
127.0.0.1 test.tld
127.0.0.1 www.test.tld
Than your vhost should work on your computer. If you want the name everywhere in your network, you should use a DNS server. |
|
Back to top |
|
Virsacer

Joined: 16 Jan 2010 Posts: 108 Location: Germany, Darmstadt
|
Posted: Wed 27 Jan '10 12:57 Post subject: |
|
|
I added them long time ago...
And I dont know what I did, but its working now... |
|
Back to top |
|
|
|
|
|
|