Cant get Virtual Host to work.....Grrrrr

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cant get Virtual Host to work.....Grrrrr

Postby theplayer » 06. September 2006 09:49

Hi,

This is my setup;

I have a SBS2000 Server redirecting the web traffic to workstation inside the network using the ISA Publish Web Rule (No problem here).

The workstation has Xampp installed and works just fine.

My domain name is www.xxxxxxx.co.uk BUT this is forwarded in a frame and masked. The real address is 212.xxx.xxx.xxx. So when I type in the web address its really sending the IP address instead of the web address.

In my virtual hosts file, the servers are setup but being ignored for some reason?. Would it be because the web redirect is sending a framed page or would be an issue with my DNS etc.

If I type any of the three different web addresses I have (that are redirecting traffic via the IP) the web address the default site comes up so it is working but just ignoring the other virtual hosts that I have setup?.

Any idea.

Thanks
theplayer
 
Posts: 1
Joined: 25. August 2006 15:46

Postby Izzy » 06. September 2006 11:03

I have no idea how you have setup your virtual host containers so I can only throw some guesses at you.

Use your IP wherever you can.

Code: Select all
#The first container is always the default and should really be your XAMPP localhost address so you can always get to your XAMPP Welcome Page by typing http://localhost this way you can test your server is working as it should.

NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs" #insert your own path here
</VirtualHost>

#Next come your actual virtual hosts in no particular order as once the localhost is set as default the order is irrelevant.

NameVirtualHost 212.xxx.xxx.xxx:80

<VirtualHost 212.xxx.xxx.xxx:80>
ServerName domainname.tld
ServerAlias www.domainname.tld anothername.tld anothername2 #as many aliases as you like that access the same web content.
DocumentRoot "your:/path/in/here"
<Directory "your:/path/in/here">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 212.xxx.xxx.xxx:80>
ServerName domainname2.tld
ServerAlias www.domainname2.tld anothername.tld anothername2
DocumentRoot "your:/path/in/here"
<Directory "your:/path/in/here">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Etc.etc.


To test the httpd-vhost.conf for errors - at a command prompt in:
xampp/apache/bin

type:
apache -S

Domain names that are accessed from the Internet should always resolve with correct nameservers and DNS zone files.

Pasting your obfuscated httpd-vhosts.conf file with some addresses and IP details would be an advantage and may speed up an informed reply.

Here is some reading for you:
http://httpd.apache.org/docs/2.2/mod/co ... irtualhost

http://httpd.apache.org/docs/2.0/vhosts/examples.html
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 48 guests