You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leon Oosterwijk <le...@daveramsey.com> on 2003/05/15 18:24:36 UTC

[users@httpd] Erradic Behaviour with Apache 2.0.45 on Win2k w/ SSL & Virtual Hosts

I've encountered a strange problem with Apache with virtuals hosts on
windows.

We recently put a second website on our web server. I switched from ip-based
to virtual hosting in order to accomplish this.

All that said it seems to work, mostly. this is the problem. If a user goes
to "www.site1.com" this site comes up nicely. if that same user then went to
"www.site2.com" it pulls up the information for site1 ! If i close my
browser and then go to site2 it comes up like it should. the problem occurs
when someone tries to visit first site1 and then site2 in the same browser
window. I ran some checks and it is defintately not caching or some browser
mixup. apache just serves the wrong index.html!

Because we are also running SSL I had to make some changes to the config to
make it just accept SSL on a certain ip and not the _default_ it used to be.
The problem persists even if I turn OFF the SSL.


For clarification, here is parts of my config:

DocumentRoot "d:/Inetpub/wwwroot"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "d:/Inetpub/wwwroot">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

NameVirtualHost *

<VirtualHost *>
    ServerAdmin webmaster@daveramsey.com
    DocumentRoot "d:/Inetpub/wwwroot"
    ServerName daveramsey.com
    ServerAlias *.daveramsey.com
	Include conf/redirect.conf
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@totalmoneymakeover.com
    DocumentRoot "d:/Inetpub/wwwroot/totalmoneymakeover"
    ServerName totalmoneymakeover.com
    ServerAlias *.totalmoneymakeover.com
    ErrorLog logs/totalmoneymakeover.com-error_log
    CustomLog logs/totalmoneymakeover.com-access_log common
	Include conf/redirect.conf
</VirtualHost>


<VirtualHost 192.168.0.9:443>
	DocumentRoot "d:/Inetpub/wwwroot"
	ServerName webdev.daveramsey.com:443
	ServerAdmin webaster@daveramsey.com
	ErrorLog logs/error.log
	TransferLog logs/access.log
	Include conf/redirect.conf

...

</VirtualHost>




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Erradic Behaviour with Apache 2.0.45 on Win2k w/ SSL & Virtual Hosts

Posted by Paul Simon <wr...@yahoo.com>.
> 
> All that said it seems to work, mostly. this is the
> problem. If a user goes
> to "www.site1.com" this site comes up nicely. if
> that same user then went to
> "www.site2.com" it pulls up the information for
> site1 ! 
> 
> 
> For clarification, here is parts of my config:
> 
> DocumentRoot "d:/Inetpub/wwwroot"

Why don't you just take the DocumentRoot directive out
of your main config since you have it in the
respective VirtualHosts? It may be confusing the
situation. 

 
> <VirtualHost *>
>     ServerAdmin webmaster@totalmoneymakeover.com
>     DocumentRoot
> "d:/Inetpub/wwwroot/totalmoneymakeover"
>     ServerName totalmoneymakeover.com
>     ServerAlias *.totalmoneymakeover.com
>     ErrorLog logs/totalmoneymakeover.com-error_log
>     CustomLog logs/totalmoneymakeover.com-access_log
> common
> 	Include conf/redirect.conf
> </VirtualHost>

I don't know if this fixes your problem but why don't
you put the DocumentRoot for totalmoneymakeover.com
outside of the Directory which daveramsey.com uses?
For example, Make the DocumentRoot for
totalmoneymakeover.com:

d:/Inetpub/totalmoneymakeover or
d:/Inetpub/totalmoneymakeover/wwwroot or
d:/totalmoneymakeover/Inetpub/wwwroot 

> 
> 
> <VirtualHost 192.168.0.9:443>
> 	DocumentRoot "d:/Inetpub/wwwroot"
> 	ServerName webdev.daveramsey.com:443
> 	ServerAdmin webaster@daveramsey.com
> 	ErrorLog logs/error.log
> 	TransferLog logs/access.log
> 	Include conf/redirect.conf
> 
> ...
> 
> </VirtualHost>


=====
=====
'Ideals are like stars. We may never reach them, but we use them to chart our course.' -- Unknown
=====
"Do not go where the path may lead, go instead where there is no path and leave a trail" -- Ralph Waldo Emerson.
=====

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org