Last active
November 16, 2019 06:42
-
-
Save developer-anuragsingh/6fac13de7d4814316ffc4c03aa154b73 to your computer and use it in GitHub Desktop.
Add 'Host Entry' and 'Virtual Hosts' for development environment
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
| Windows | |
| ----------- | |
| Step 1 - Open following location in your file browser | |
| Step 2 - Open 'hosts' file (As administrator) | |
| Step 3 - Add this line in bootom of the file | |
| Step 4 - If you want that YOUR DOMAIN points your local directory than, add | |
| 127.0.0.1 YOUR-WEBSITE.COM # Replace 'YOUR-WEBSITE.COM' with your actual domain name | |
| # Above '127.0.0.1' is your local IP (Localhost) address | |
| OR | |
| If you want that YOUR DOMAIN points new IP than, add | |
| 12.345.678.90 YOUR-WEBSITE.COM # Replace 'YOUR-WEBSITE.COM' with your actual domain name | |
| # Above '12.345.678.90' is the new IP address where your website is hosted | |
| Step 5 - Open 'httpd-vhosts.conf' file in your system | |
| Step 6 - Navigate to directory - 'DRIVE:\XAMPP\apache\conf\extra' | |
| Step 7 - Open 'httpd-vhosts.conf' file in editor (As administrator) | |
| Step 8 - Add these lines of code in bottom of the file. | |
| <VirtualHost YOUR-WEBSITE.COM:80> # Replace 'YOUR-WEBSITE.COM' with your actual domain name | |
| DocumentRoot "E:\Server\htdocs\wp\YOUR-WEBSITE.COM" # Absolute path of your website local directory | |
| ServerName YOUR-WEBSITE.COM # Domain name which you want to host | |
| </VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment