Skip to content

Instantly share code, notes, and snippets.

@newhavengill
Created January 2, 2015 16:51
Show Gist options
  • Save newhavengill/d1b4b71bf7089dd3fa09 to your computer and use it in GitHub Desktop.
Save newhavengill/d1b4b71bf7089dd3fa09 to your computer and use it in GitHub Desktop.
Apache2 local config on Yosemite
# Apache configuration
#
# To install on an OS X machine do this:
#
# Open /etc/apache2/httpd.conf
# set DocumentRoot "/Users/newhavengill/www/docs"
# set <Directory "/Users/newhavengill/www/docs">
#
# To use .htaccess in each site make edit to allow all
# set AllowOverride All
#
# $ sudo cp apache2-custom.conf /etc/apache2/other/custom.conf
# $ sudo /usr/sbin/apachectl restart
# $ sudo /usr/sbin/apachectl -t
#
Listen 0.0.0.0:8098
<VirtualHost 0.0.0.0:8098>
DocumentRoot "/Users/newhavengill/www/docs/"
ServerName localhost
<Directory "/Users/newhavengill/www/docs/">
Options FollowSymLinks Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html
</Directory>
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
## Example using Basic Auth: username:password 64 bit encoded
RequestHeader set Authorization "Basic dMOlcm5hbYEDcGFzc3="
ProxyPass /foo http://username:password@iwebqa01:8080/blah/blah/foobar
ProxyPassReverse /foo http://username:password@iwebqa01:8080/blah/blah/foobar
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment