Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # In your /Applications/MAMP/conf/apache/httpd.conf file, ensure your Directory settings are as follows:
- <Directory "/Applications/MAMP/htdocs">
- Options Indexes Includes FollowSymLinks ExecCGI
- AllowOverride All
- Order allow,deny
- Allow from all
- </Directory>
- # In your httpd.conf file, add the following at the end of the file to enable/use virtual hosts:
- #
- # MAMP Virtual Hosts
- #
- NameVirtualHost *:80
- <VirtualHost _default_:80>
- DocumentRoot "/Applications/MAMP/htdocs"
- </VirtualHost>
- <VirtualHost *:80>
- ServerName localhost
- DocumentRoot "/Applications/MAMP/htdocs"
- ErrorLog /MAMP/logs/localhost_error.log
- LogLevel warn
- <Directory "/Applications/MAMP/htdocs">
- Options Indexes Includes FollowSymLinks ExecCGI
- AllowOverride All
- Order allow,deny
- Allow from all
- </Directory>
- </VirtualHost>
- # Then, for each site (virtual host), you would add a new VirtualHost entry like this:
- <VirtualHost *:80>
- ServerName local.mywebsite.com
- DocumentRoot "/Applications/MAMP/htdocs/mywebsite.com"
- ErrorLog /MAMP/logs/mywebsite.com_error.log
- LogLevel warn
- <Directory "/Applications/MAMP/htdocs/mywebsite.com">
- Options Includes FollowSymLinks
- AllowOverride All
- Order allow,deny
- Allow from all
- </Directory>
- </VirtualHost>
- # Then edit your /etc/hosts file to include your site:
- # Add:
- 127.0.0.1 local.mywebsite.com
- # Then restart MAMP.
- # If you have MAMP Pro, it will do all of this automatically for you.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement