Which files are edited by VirtualHostX when a new host is added or deleted?
I'm sort of new to all this, so I'm trying to better understand the magic behind VirtualHostX. I also think I've screwed up some files along the way, trying to set up Apache, PHP, and MySQL on my Mac running OS X 10.5, Leopard.
I've successfully installed Apache, PHP, and Virtual Hosts, but haven't been able to install MySQL. So I thought I would give up trying to install MySQL and just install MAMP. However, I couldn't get VirtualHostX to work with my new MAMP install. I wasn't sure if both Apaches were running, or which files where being changed, or if they were being changed at all (too much magic behind the scenes). So now I am back to the drawing board.
Could you enlighten me as to what goes on when I add or delete, and apply the changes to my Apache files?
I've successfully installed Apache, PHP, and Virtual Hosts, but haven't been able to install MySQL. So I thought I would give up trying to install MySQL and just install MAMP. However, I couldn't get VirtualHostX to work with my new MAMP install. I wasn't sure if both Apaches were running, or which files where being changed, or if they were being changed at all (too much magic behind the scenes). So now I am back to the drawing board.
Could you enlighten me as to what goes on when I add or delete, and apply the changes to my Apache files?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?Hi.
When you initially run the VirtualHostX setup wizard, it uncomments this line
Include /private/etc/apache2/extra/httpd-vhosts.conf
in your Apache config file located here
/private/etc/apache2/httpd.conf
Then, if it detects you have MAMP installed, it adds this line
Include /private/etc/apache2/extra/httpd-vhosts.conf
to MAMP's Apache config file located here
/Applications/MAMP/conf/apache/httpd.conf
That's it for the setup process. Beyond that, VHX simply adds virtual hosts to this file
/private/etc/apache2/extra/httpd-vhosts.conf
whenever you save your settings.
The company and 2 other people say
this answers the question
-
that answers my question, thanks! -
And when you totally screw things up (like I did) the way to get back to base is ...
1. Forget what all the boffins tell you! You'll waste hours!!
2. Make sure Web Sharing is off
3. Grab an untampered copy of httpd.conf and php.ini.default from another system running SnowLeopard.
4. Trash your modified copies of php.ini , php.ini.bak , php.ini.default , httpd.conf and replace with the fresh untampered copies.
5. reboot your computer (to be sure)
6. edit httpd.conf using a plain text editor (textWrangler or textMate) to remove the # and enable php5
7. start websharing, click on your personal website url and load a php/html test file (preferably a phpinfo.php file).
**Beautiful - PHP working as it should be.
Why... how... these files got so screwed up? I DID foolishly (accidentally) try to install VHX and MAMP over the top of an already enabled httpd.conf file. It took me all day trying to get to the bottom of the problem - and I didn't. I read every "experts" guide but it didn't help. Much quicker (5 minutes) to start with fresh files (as above). Going back to base -- "knowing how" to go back to base makes it much easier to try again.
Tyler, thanks so much for trying to sort it out. I will have another crack at it - just gotta disable PHP first !! -
Inappropriate?my apache stops running after i run the setup wizard :|
but, after i test my apache config, it turns out VirtualHostX removes the additional apache modules i included recently.
nothing serius really, i simply add them back. but it's an annoying bug. u guys should check it out.
Loading Profile...



EMPLOYEE