Created
April 20, 2014 17:19
-
-
Save erfanimani/11119611 to your computer and use it in GitHub Desktop.
Simple Apache2.2 configuration that allows you to use deployments through git for very basic sites.
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
<Directory /var/www> | |
Order Deny,Allow | |
Allow from all | |
AllowOverride All | |
</Directory> | |
<Directorymatch "^/.*/\.git/"> | |
Order deny,allow | |
Deny from all | |
</Directorymatch> | |
<Files ~ "^(bower.json|Gruntfile.js|.gitignore|package.json)$"> | |
Order deny,allow | |
Deny from all | |
</Files> | |
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
# get the server name from the Host: header | |
UseCanonicalName Off | |
# include the server name in the filenames used to satisfy requests | |
VirtualDocumentRoot /var/www/%0/public | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment