Forked from avtaniket/localhost to custom domain in ubuntu.txt
Last active
June 20, 2017 16:34
-
-
Save ajithrn/25c2b5cbae71452022dbaf2d99356f1b to your computer and use it in GitHub Desktop.
Ubuntu / localhost to custom domain
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
Step 1: Add domain entry in hosts file (sudo nano /etc/hosts) | |
127.0.0.1 local-server.dev | |
Step 2: Add redirection policy in IP-Tables | |
sudo iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 8888 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment