Page 1 of 1

http & https not separated

PostPosted: 24. November 2007 00:08
by magren
Hi.
Bare with me, i'm new to apache ;)
I have two websites running on the same apache. www.domain.com and portal.domain.com
The first site (www.domain.com) will run on port 80 only and the other (portal.domain.com) will be an https web (443) only.

My problem is that i can surf to https://www.domain.com and then the https://portal.domain.com site loads.
Vice versa when i surf to http://portal.domain.com the www.domain.com site loads.

What have i missed?

httpd-vhosts.com
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:/xampp/htdocs/www-site"
ServerName www.domain.com
## ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log
## CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common
</VirtualHost>

httpd-ssl.conf
<VirtualHost _default_:443>
# General setup for the virtual host
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:/xampp/htdocs/portal-site"
ServerName portal.domain.com

PostPosted: 26. November 2007 15:07
by LooseCannon
Hello and Welcome magren.

I'm barely beyond being 'new' to Apache, so just some simple points from me and they might be inappropriate. Shared learning and all that... Here goes.

DocumentRoot doesn't use speech marks, so try:
DocumentRoot D:/xampp/htdocs/www-site
DocumentRoot D:/xampp/htdocs/portal-site


The VirtualHost bracket for the second vhost should read:
<VirtualHost _default_ *:443>
ie, add a space and asterix before the collon, if you want requests from all hosts to be answered.