Forum Moderators: phranque

Message Too Old, No Replies

How Do I? Multiple domain names, 1 pc issues...

Restrict 1 domain accessing anothers data...

         

r6ual

11:00 am on Apr 19, 2005 (gmt 0)



Am wanting to set up 2 web hosts from my pc using Apache and a virtual host. All is ok, the only problem is, because I have one lot of info on 1 site, website1.com, which runs on port 80. Then have made a VirtualHost website2.com:8080, and that runs ok too. BUT, if I take away the 8080 on the address bar in explorer, it will display the index page for website1. Similarly, if I put website1:8080 in the address bar, it will display the index page for website2.com. How can I stop one domain name from acessing the others pages. I have obviously put the files for each web in different directories. Have looked and tried the "Allow from' variables with no success, dont have THAT much knowlwedge about Apache. Am wondering if Im putting it in the wrong place or if I'm not inputting the RIGHT variables... Any help would be greatly appreciated.

Ta, Paul.

P.s Im running Apache 2 on a Windows 2003 Server.
Heres a copy of my conf file. [members.iinet.net.au...]

AlwaysSayNever

11:42 am on Apr 19, 2005 (gmt 0)

10+ Year Member



Hmm I had a similar experience when I tested this myself using Apache2triad on WinXP Pro.

in my httpd.conf I have:

Listen *:9955

and later defined two virtual hosts

<VirtualHost *:9955>
ServerAdmin mee@gmail.com
DocumentRoot n:/web/pathbits/host1
ServerName host1.gmail.com
</VirtualHost>

<VirtualHost *:9955>
ServerAdmin mee@gmail.com
DocumentRoot n:/web/pathbits/host2
ServerName host2.gmail.com
</VirtualHost>

And I noticed when I used host3.gmail.com (currently undefined in apache) host1.gmail.com tried to load. To solve this (keep in mind I'm an apache novice but a determined geek) I added a new virtual host above the other two:

<VirtualHost *:9955>
ServerAdmin mee@gmail.com
DocumentRoot n:/web/pathbits/empty
ServerName *
</VirtualHost>

This prevented me from 'discovering' the other virtual hosts.