vhosts problems - solved

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

vhosts problems - solved

Postby PaulC2K » 28. July 2010 04:15

Seems like a bit of a broken record in here :? and unfortunately I havent seen anyone reporting the same issues ive been having, and all the various places showing how to set it up seem to give me different results which doesnt help either.

Im using xampplite 1.7.0.0, vhosts file is enabled in httpd-conf, and im only interest in local access, this is what ive been trying...

hosts
Code: Select all
127.0.0.1   localhost
127.0.0.1   local.mydomain.com
127.0.0.1   local.myotherdomain.com

httpd-vhosts.conf
Code: Select all
<VirtualHost 127.0.0.1:80>
DocumentRoot d:/xampplite/htdocs/
ServerName localhost
ServerAdmin admin@localhost
</VirtualHost>

<VirtualHost local.mydomain.com:80>
DocumentRoot d:/xampplite/htdocs/mydomain.com/
ServerName local.mydomain.com
ServerAdmin admin@local.mydomain.com
</VirtualHost>


That always brings me to the xampp setup area. http://local.mydomain.com/xampp/ to be precise.
I cant quite understand why it comes to this, what ive seen a few times is everything ive set up be redirected to the first entry in the vhosts file. Infact, removing the localhost block and it links through to the my local site fine, but for some reason everything after the first vhost configuration means nothing, it just sends it to the first vhost.
Hopefully this is something someone can relate to or can see exactly why im getting these results and how to correct it.

This isnt an area im used to playing in, so its pretty much an out of the box installation, and i really need to start using vhosts and right now all im doing is pulling my hair out :oops: so I really could do with some help with this as im fairly out of my depth in this area and going off variations of other peoples work isnt working for me unfortunately. I'd really appreciate some suggestions right now. Thx
Last edited by PaulC2K on 28. July 2010 21:15, edited 1 time in total.
PaulC2K
 
Posts: 9
Joined: 28. July 2010 03:26
XAMPP version: PHP 7.4.27
Operating System: Win10

Re: vhosts problems

Postby Altrea » 28. July 2010 05:56

If you want to use namebased vhosts in vhosts you had do define a "NameVirtualHost" line.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: vhosts problems

Postby PaulC2K » 28. July 2010 21:15

Altrea wrote:If you want to use namebased vhosts in vhosts you had do define a "NameVirtualHost" line.

THANK YOU!!

I see the line in the file talking about that now, however to be honest i wouldnt have known what it was going on about and without being told to use it, wouldnt have got anywhere with it.

Everything seems to be fine now, i did think i'd solved it a few days ago but then realised all the vhosts addresses were going to the site i'd been focusing on lately.

:mrgreen:
PaulC2K
 
Posts: 9
Joined: 28. July 2010 03:26
XAMPP version: PHP 7.4.27
Operating System: Win10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 273 guests