Mac Virtualhost follow up

  • Nov 15, 2006
  • ·
  • ·

A couple of people asked for the details of the virtualhost script I modified for use with MAMP in a previous post. Apologies for taking a bit of time.

First I had to make these changes to the original virtualhost script:

DOC_ROOT_PREFIX="/Applications/MAMP/htdocs"

<pre>APACHE_CONFIG="/Applications/MAMP/conf/apache" APACHECTL="/Applications/MAMP/Library/bin/apachectl"</pre>

I also made a few changes to httpd.conf in /Applications/MAMP/conf/apache. From memory first to allow local .htaccess files to override everything on a per directory basis.

<pre>&lt;Directory "/Applications/MAMP/htdocs"&gt; oAllowOverride All &lt;/Directory&gt;</pre>

and then to point to the virtual hosts directory.

<pre>NameVirtualHost 127.0.0.1 Include /Applications/MAMP/conf/apache/virtualhosts</pre>

I keep meaning to do a screen capture tutorial of sorts, so maybe something like this would be a good starting point? We shall see as and when time permits. Probably this time next year. Any problems let me know and I’ll try and debug.