Let's make an example, say that your server IP address is 1.2.3.4 and your domain is mydomain.com. You are working on the site and want to test the site on your server at Hosting.com however you are not ready to update DNS just yet.
For this tutorial it is important to under host headers and how to set them inside of IIS
Modify Host Header Information in IIS7
2. Expand Sites
3. Right Click on Web Site to be Adjusted and Choose Edit Bindings
4. To Edit an Existing Highlight the Record and Click Edit or Click Add To Add a New Record
5.Select the Proper IP Address, TCP Port, and Host Header Value
6. Hit OK
If you are only hosting one site and this site is the only site bound to port 80 inside of IIS you can simply access the site using the server IP address at http://1.2.3.4
If you are hosting more than one site on a Windows server you'll need to configure individual host headers for each site as all site(s) must have a unique binding.
The simplest solution for previewing a site on a Windows server is by adjusting the host header information to use an alternate port. If you adjust the host header of your test site from 80 to 8080 you can then access your site at http://1.2.3.4:8080
Another option that allows you to preview a site before updating the DNS is by creating a sub-domain record to preview the site. You can create a DNS record of test as an A record pointing to the IP address of your server at Hosting.com therefore test.mydomain.com resolves to your server solution.
Then you'll need to configure your server to listen for requests for test.mydomain.com. Inside of IIS you'll need to create a host header of test.mydomain.com listening on IP 1.2.3.4 for traffic on port 80.
This will allow the http://test.mydomain.com to resolve to this site inside of IIS.
No comments:
Post a Comment