Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Apache2

Apache2
Thread Tools
Mac Enthusiast
Join Date: Jan 2007
Status: Offline
Reply With Quote
Mar 9, 2009, 03:00 PM
 
I do my development on a virtualized server that i can access over zeroconf. I would like to be able to type in project1.devbox.local and have it serve out of the project1/ directory in my home directory. I currenty modify my hosts file on my so that 'project1' points to the server and i have a vhost named-server that handles redirecting. I have to have one file per host on my dev box and I have to modify my hosts file.

I'm wondering if there is a one-shot vhost that I can make to point *.devbox.local to /home/me/*/ ?
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Mar 9, 2009, 04:19 PM
 
If you are talking about having subdomains point to various directories in /home/me, you will have to create virtual host entries for each of these sites. You could redirect or rewrite to particular directories with mod_rewrite rules though.
     
Mac Enthusiast
Join Date: Jan 2007
Status: Offline
Reply With Quote
Mar 9, 2009, 04:28 PM
 
Thanks, Besson. Looks like the way I'm going about it now is the way to do it. Was hoping for a slick one-file solution.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Mar 9, 2009, 04:49 PM
 
That one-file solution may very well be the mod_rewrite rules in an .htaccess file. You can get a whole lot of mileage out of mod_rewrite. If this is important enough to you, I'd look into this. mod_rewrite is immensely useful anyway.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2