Created
May 15, 2018 23:16
-
-
Save Geri-Borbas/e74b013d7de54442a16fa1973c9c1151 to your computer and use it in GitHub Desktop.
An example of Virtual Hosts definitions for MAMP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Virtual Hosts | |
# | |
# If you want to maintain multiple domains/hostnames on your | |
# machine you can setup VirtualHost containers for them. Most configurations | |
# use only name-based virtual hosts so the server doesn't need to worry about | |
# IP addresses. This is indicated by the asterisks in the directives below. | |
# | |
# Please see the documentation at | |
# <URL:http://httpd.apache.org/docs/2.2/vhosts/> | |
# for further details before you try to setup virtual hosts. | |
# | |
# You may use the command line option '-S' to verify your virtual host | |
# configuration. | |
# | |
# Use name-based virtual hosting. | |
# | |
NameVirtualHost *:80 | |
# | |
# VirtualHost example: | |
# Almost any Apache directive may go into a VirtualHost container. | |
# The first VirtualHost section is used for all requests that do not | |
# match a ServerName or ServerAlias in any <VirtualHost> block. | |
# | |
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot '/Users/eppz/Dropbox/Web Server/' | |
ServerName localhost | |
ErrorLog 'logs/localhost.error_log' | |
CustomLog 'logs/localhost.access_log' common | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot '/Users/eppz/Dropbox/Web Server/blog.eppz.eu/' | |
ServerName sandbox.blog.eppz.eu | |
ErrorLog 'logs/sandbox.blog.eppz.eu.error_log' | |
CustomLog 'logs/sandbox.blog.eppz.eu.access_log' common | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot '/Users/eppz/Dropbox/Web Server/tangram.eppz.eu/' | |
ServerName sandbox.tangram.eppz.eu | |
ErrorLog 'logs/sandbox.tangram.eppz.eu.error_log' | |
CustomLog 'logs/sandbox.tangram.eppz.eu.access_log' common | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot '/Users/eppz/Dropbox/Web Server/carocaroprints.com/' | |
ServerName sandbox.carocaroprints.com | |
ErrorLog 'logs/sandbox.carocaroprints.com.error_log' | |
CustomLog 'logs/sandbox.carocaroprints.com.access_log' common | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot '/Users/eppz/Dropbox/Web Server/eppz.eu/' | |
ServerName sandbox.eppz.eu | |
ErrorLog 'logs/sandbox.eppz.eu.error_log' | |
CustomLog 'logs/sandbox.eppz.eu.access_log' common | |
# DISABLE ALL CACHING WHILE DEVELOPING | |
<FilesMatch "\.(html|htm|js|css|json)$"> | |
FileETag None | |
<IfModule mod_headers.c> | |
Header unset ETag | |
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Note "CACHING IS DISABLED ON LOCALHOST" | |
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" | |
</IfModule> | |
</FilesMatch> | |
</VirtualHost> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment