Mac Leopard + MAMP - all virtual hosts point to root
On MacOS X 10.5.8 with MAMP 1.7.2. Have configured VirtualHostX for three virtual hosts (texasbrazil.site, agileid.site, test.site) each pointing to a different subdirectory under the root at "/Applications/MAMP/htdocs/". However when I view in browser all end up pointing to files in htdocs root. Have confirmed that "Include /private/etc/apache2/extra/httpd-vhosts.conf" is uncommented in httpd.conf. Also have inspected httpd-vhosts.conf to see that VirtualHostX has written three VirtualHosts blocks. Have started and stopped MAMP, but problem persists. Any other suggestions?
Chris
Chris
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?Open up System Preferences --> Sharing and make sure Web Sharing is unchecked. It sounds like Apple's built-in Apache is getting in the way of MAMP.
-
Inappropriate?Nope - Web Sharing is turned off (I should have explicitly said this earlier). Besides everything is pointing to the MAMP root directory at "/Applications/MAMP/htdocs/" and not the Web Sharing root.
-
Inappropriate?OK, I have a resolution. Your response made me investigate further how OSX web sharing might be interfereing. I reviewed the apache docs and then I specifically looked for the files containing Virtual Host configurations.
I identified the following files which contained Apache Virtual Host configuration settings for the OSX Apache 2 Web Server:
/private/etc/apache2/extra/httpd.conf
/private/etc/apache2/extra/httpd-vhosts.conf
I reviewed and discovered that VirtualHostX 2.0 was modifying the http-vhosts.conf file (even though MAMP was selected within VirtualHostsX preferences panel). This file was being referenced by the httpd.conf file.
So I then went looking for configuration files for the MAMP Apache server, which I found at:
/Applications/MAMP/conf/apache/httpd.conf
Opening this file up I looked for VirtualHost related settings and found that there weren't any, just a commented section identifying where they should be placed.
So I added the following:
NameVirtualHost *:80
Include /private/etc/apache2/extra/httpd-vhosts.conf
and saved the file and restarted the server. The problem was resolved.
Chris
I’m resolved
1 person says
this answers the question
-
Inappropriate?Thanks, cluther, your solution worked for me too. Not quite sure why you need to go through this rigmarole to get virtualhosts sorted. Could this not be built into VHX Tyler?
I’m happy
-
Inappropriate?I just released version 2.0.6. This should fix the problem :-)
Loading Profile...



EMPLOYEE