Created
July 26, 2014 16:09
-
-
Save imax/8841a7a229ad834e82f1 to your computer and use it in GitHub Desktop.
I want to be able to access local dev server at local.djinni.co instead of using localhost:8000. You can plug any domain name into via /etc/hosts but using default http port (80) requires some trickery. I used default Apache server with virtual hosts support.
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
# enable Apache | |
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist | |
# Vim /private/etc/apache2/httpd.conf | |
# Enable Virtual Hosts Include | |
# Vim /private/etc/apache2/extra/httpd-vhosts.conf | |
<VirtualHost *:80> | |
ProxyPreserveHost On | |
ServerName local.djinni.co | |
<Location /> | |
ProxyPass http://localhost:8000/ | |
ProxyPassReverse http://localhost:8000/ | |
Order allow,deny | |
Allow from all | |
</Location> | |
</VirtualHost> | |
# Vim /etc/hosts | |
127.0.0.1 localhost local.djinni.co |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment