Skip to content

Instantly share code, notes, and snippets.

@gam-phon
Last active December 15, 2015 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gam-phon/5254069 to your computer and use it in GitHub Desktop.
Save gam-phon/5254069 to your computer and use it in GitHub Desktop.
Sample Apache2 configuration.
<VirtualHost *:80>
ServerName www.yr.com
ServerAdmin webmaster@yr.com
DocumentRoot /home/yaser/site-name/www
RewriteEngine on
ProxyPreserveHost On
RewriteCond $1 !^/(img|css|js|robots\.txt|media|static|s)/
RewriteRule ^(.*) http://localhost:8008$1 [P]
<Location /admin>
Order Allow,Deny
Allow from localhost
Allow from 10.10.12.20
</Location>
<Proxy *>
Order deny,allow
Allow from all
Allow from localhost
</Proxy>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment