Setting up VirtualHosts

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Setting up VirtualHosts

Postby dashauer » 22. April 2006 01:58

I've tried reading this forum and can't find any posts that are relevant.

What should the httpd.conf file look like to get virtual hosts setup? Here is what I have:

Code: Select all
<VirtualHost *:80>
ServerName www.straightfromthestudio.dev
ServerAlias straightfromthestudio.dev *.straightfromthestudio.dev
DocumentRoot /Volumes/Emily/Sites/straightfromthestudio/straightfromthestudio.com
</VirtualHost>


When I added this, I lost access to localhost, and visiting straightfromthestudio.dev does nothing.
dashauer
 
Posts: 5
Joined: 22. April 2006 01:53

Postby capitalfellow » 22. April 2006 03:17

The easiest thing is not worry about trying to get your dev domain to resolv and to instead replace

ServerName www.straightfromthestudio.dev
ServerAlias straightfromthestudio.dev *.straightfromthestudio.dev

with

ServerName localhost
User avatar
capitalfellow
 
Posts: 60
Joined: 19. July 2005 01:10
Location: Charlotte, NC USA
Operating System: OS X

Postby dashauer » 22. April 2006 22:02

I don't want to run off a sub folder of localhost, I want it to act like the real domain would.

Anyway, I got the VirtualHost thing figured out, but many other major issues are still there.
dashauer
 
Posts: 5
Joined: 22. April 2006 01:53

Postby capitalfellow » 23. April 2006 14:53

Since you've changed the DocumentRoot to point to somewhere specific then localhost will act like a real domain and your content will be available at the root not a subfolder.

If you still want to go to the trouble of setting up domain aliases then read this article on Enabling Virtual Hosts on MacOS X
User avatar
capitalfellow
 
Posts: 60
Joined: 19. July 2005 01:10
Location: Charlotte, NC USA
Operating System: OS X

Postby dashauer » 23. April 2006 18:25

I stopped trying to use XAMPP and just used the default Apache and PHP install, added MySQL and had it running in 30 minutes. Sorry, but XAMPP was way more difficult than doing it manually.
dashauer
 
Posts: 5
Joined: 22. April 2006 01:53


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 83 guests