Created
August 29, 2016 13:30
-
-
Save avtaniket/36051a4d79fe49e11fd4f8a94d478aec to your computer and use it in GitHub Desktop.
localhost to custom domain in ubuntu
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 (vim /etc/hosts) | |
127.0.0.1 dev.mywebsite.com | |
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