Like many, my goal is to create a web dev environment as I learn before posting up on a hosted server. I keep my computer partitioned with the root partition housing the OS of course and the final partition containing all my user content which includes my sites. I also keep another partition with a fresh unharmed install of OS X. My complication lies where I try to set up a virtual host. Skipping the details of my two weeks of fails and successes, here is a snapshot of my current situation…
Using XAMPP, for whatever reason my relative links were not working properly. When i came across some clue that suggests i should us a virtual host to get the relative links working i then followed another tutorial on this subject. I was successful in getting XAMPP to work with a virtual host but then "localhost" reports back as "404 page not found". Using XAMPP i need to access the MySQL folder where my databases live. Without using a virtual host i have been successful in housing my site in my user sites folder and accessing the XAMPP admin page along with the PHPmyAdmin.
I'm in "process of elimination" mode as i try to troubleshoot my way to some resolve. I killed XAMPP and followed another tutorial in setting up Apache/php/MySQL then repeated the process for setting up the virtual host and ended up with the same results… "404 not found". I was under the belief that i could have unknowingly messed up some configuration in XAMPP so by trying the native OS Apache install at least it gives some hope that i didn't mess up XAMPP.
I then assumed i might have messed up some configuration within the OS… I then booted into my fresh install of OS X and repeated the above. Again, success using Apache but no luck when trying to access localhost. Same results! So, I think it's safe to say that my OS config is fine, XAMPP config is fine… which brings me to the common place of the httpd.conf or the vhosts.conf files. Seeing as I can revert back at any time to dropping the virtual hosts and using only the httpd.conf file with success, this leads me to believe that I don't have the write tags in my vhosts file. Now I have tried more numerous configurations than there are neurological pathways in my head, so here's the latest...
#### LOCALHOST - DO NOT CHANGE ####
Options Indexes FollowSymLinks Includes execCGI
Allow From All
#### VIRTUAL HOST - MySite ####
CustomLog "logs/svr.loc-access_log" common
Now, i wouldn't mind working in the native set up using OS X's Apache install, but i run into the complication of using php 5.3.1 which has reported bugs that prevent me from using mediawiki. I stepped down to XAMPP version 1.7.2 for this reason after having tried countless attempts to up/downgrad php and failed. My goal was to learn web dev not web hosting and have yet to be able to really get started. Please help : )