Virtual host configuration problem

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

Virtual host configuration problem

Postby thirstywork » 08. December 2009 15:55

Hi,

No idea what I am doing wrong here...

I want http://help.canlaorn.com/ to point to C:\xampp\htdocs\help but unless I use http://help.canlaorn.com/help I get redirected to http://help.canlaorn.com/xampp/

This is what I have in the httpd-vhosts.conf.

Code: Select all
NameVirtualHost 79.123.106.89:80

<VirtualHost help.canlaorn.com>
DocumentRoot "C:/xampp/htdocs/help/"
DirectoryIndex index.html
ServerName help.canlaorn.com
ErrorLog "logs/help.canlaorn.com-error.log"
CustomLog "logs/help.canlaorn.com.log" combined
</VirtualHost>
thirstywork
 
Posts: 3
Joined: 08. December 2009 15:16

Re: Virtual host configuration problem

Postby Wiedmann » 08. December 2009 16:00

Code: Select all
NameVirtualHost 79.123.106.89:80

<VirtualHost help.canlaorn.com>

replace this 3 lines from your code with:
Code: Select all
NameVirtualHost *:80

<VirtualHost *.80>
ServerName localhost
</VirtualHost>

<VirtualHost *.80>
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Virtual host configuration problem

Postby thirstywork » 08. December 2009 16:10

Thanks for the reply, I replaced the lines as you said so it now looks like this:

Code: Select all
NameVirtualHost *:80

<VirtualHost *.80>
ServerName localhost
</VirtualHost>

<VirtualHost *.80>
DocumentRoot "C:/xampp/htdocs/help/"
DirectoryIndex index.html
ServerName help.canlaorn.com
ErrorLog "logs/help.canlaorn.com-error.log"
CustomLog "logs/help.canlaorn.com.log" combined
</VirtualHost>


But I still have the same problem and now I have some errors and a warning when I start up apache

Code: Select all
[Tue Dec 08 15:11:22 2009] [error] (EAI 11001)APR does not understand this error code: Could not resolve host name *.80 -- ignoring!
[Tue Dec 08 15:11:22 2009] [error] (EAI 11001)APR does not understand this error code: Could not resolve host name *.80 -- ignoring!
[Tue Dec 08 15:11:22 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
thirstywork
 
Posts: 3
Joined: 08. December 2009 15:16

Re: Virtual host configuration problem

Postby Wiedmann » 08. December 2009 16:12

Could not resolve host name *.80 -- ignoring

Ah sorry. I guess my "shift" key is broken :-) :
It must be "*:80" and not "*.80" (two times).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Virtual host configuration problem

Postby thirstywork » 08. December 2009 16:19

Brillaint thanks alot :D

Should have picked up on the "." I guess but have spent so long trying different variations I would given anything a shot.
thirstywork
 
Posts: 3
Joined: 08. December 2009 15:16


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 88 guests