Virtual server problem: hosts pointing wrong

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

Virtual server problem: hosts pointing wrong

Postby AerixJ » 22. March 2010 22:38

I've been using XAMPP for Windows for years but have just added a Mac machine to my office and I'm having some trouble setting up XAMPP for Mac.

I don't use the default file structure for my websites; instead of storing them in the XAMPP folder, I store them in a root directory called "www".

I've edited my httpd.conf as well as the httpd-vhosts.conf files. To the best of my knowledge, they're set up in parallel to how I did them on Windows. I also edited the Mac hosts file to point all my virtual servers at 127.0.0.1, as usual. But something's wrong.

When I type the name of one of my virtual servers into a browser, I don't get the index page; instead, I get a directory listing of the whole "www" folder. For example, I have a virtual server called "speakout". But instead of the speakout site's home page, the browser gives me the "Index of /" list with all twelve or so of my site directories listed -- including speakout.

When I click on THAT link, I do get the index page -- but of course, it's all wrong, with the url being "http://speakout/speakout/index.php" instead of "http://speakout/index.php".

Perhaps my problem is something to do with the way Mac handles directory structures. Here is are the lines for speakout in my httpd-vhosts.conf file:

Code: Select all
         NameVirtualHost speakout:80
          . . .
          <VirtualHost speakout:80>
               . . .
               DocumentRoot /www/speakout
               . . .
          </VirtualHost>


And here are the lines from my httpd.conf file:

Code: Select all
          DocumentRoot "/www"
          . . .
          <Directory "/www">
          . . .
          </Directory>


I'm really baffled by the problem. Any insights?
AerixJ
 
Posts: 3
Joined: 22. March 2010 21:58

Re: Virtual server problem: hosts pointing wrong

Postby AerixJ » 22. March 2010 22:51

Moments after posting my inquiry above, I found that I'd left the "include virtual" line commented out on the httpd.conf file. Works fine now.
AerixJ
 
Posts: 3
Joined: 22. March 2010 21:58


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 26 guests