Wildcard Subdomains + Directories?

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

Wildcard Subdomains + Directories?

Postby zachr » 31. July 2010 05:04

Howdy,

I've been using XAMPP on a Windows box (Same network as my laptop, different box) for a while now as a test machine for multiple web sites. Every time I set up a site, I make a number of changes to get it up and running and I'm trying to cut down. Each site currently gets:

1) A line in my Windows hosts file: 10.0.3.70 clientsub123.devbox.local
2) A directory on the server box ( \XAMPP\htdocs\clientsub123)
3) An edit in the \XAMPP\apache\conf\extra\httpd-vhosts.conf file to add a VirtualHost section for clientsub123

So, the one I'm thinking I could eliminate here would be #3. Which leads to my question: Is there some way to set up wildcard subdomains AND have the server pull from the subdomain's matching folder automatically? So all I'd need to change is my hosts file and toss the files into the directory?

Thanks!
zachr
 
Posts: 1
Joined: 31. July 2010 04:53

Re: Wildcard Subdomains + Directories?

Postby JonB » 01. August 2010 01:27

Uh - AFAIK - the basic answer is no.

In part, I believe that is the case because of how Apache works - make a change to a .conf file, for it to take effect, you have to restart Apache. (as best I know).

You could build a script to do all this - a graceful shutdown, file edit by parameter, restart service (although it would be a bit tougher on Windows than on *nix which has all the toys for this). OR learn a provisioning system for VPS's! :lol:

Good luck (cute idea) - :mrgreen:

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 120 guests