Connect Tech Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 26 March 2012

Preview your site on a Windows Server with IIS 7 Host Headers

Posted on 23:12 by Unknown
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

1. Start > Run > inetmgr > Press Enter Key


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

Preview Your Site

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.


Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • How to schedule a PHP script in task scheduler
    Quiet often there is a need to execute/run  php  script on some time interval at server side. And that php scripts should run automatically ...
  • HTTP Error 403.19 – Forbidden The configured user for this application pool does not have sufficient privileges to run CGI applications.
    If you get the error “HTTP Error 403.19 – Forbidden The configured user for this application pool does not have sufficient privileges to...
  • Roles and Features showing an error HRESULT: 0x800F0818 in Server Manager of windows server 2008 R2
    When you open Server Manager both Roles and Features display Error and you are unable to add any role or features. When you select the det...
  • How to configure IIS 7 to redirect non-www domain to www domain?
    One of few legacy leftovers that was never dropped over the years is the common use of www domain prefix. It is not a problem per se for us...
  • Error - "Failed to retrieve data for this request (Microsoft.SqlServer.Management.sdk.sfc)"
    ErrError    - In Microsoft SQL Management Studio 2008, you receive the following error message when you try to expand the Databases:      ...
  • Reset Mysql root Password using my.ini
    Follow the below given steps to reset the Mysql root password : 1.Browse to your MySQL installation directory. 2. In there, go to "Data...
  • Disallowed Parent Path
    If you are unable to access the website and facing the below error: Active Server Pages error 'ASP 0131' Disallowed Parent Path /adm...
  • How to resolve Windows Login Error: "An unauthorized change was made to Windows"
    After connecting to windows server via RDC, you receive error “ An unauthorized change was made to Windows ” Resolution: 1) Click the opt...
  • How to upgrade Zen Cart 1.3.9 to Zen Cart 1.5
    To upgrade your Zen Cart 1.3.9 to Zen Cart 1.5, follow the following steps. (For this tutorial, I assume you are using cpanel web hosting) 1...
  • Block IP from accessing website using .htaccess
    Block IP from accessing website using .htaccess To block certain ip address from accessing your website, just create a file with name .hta...

Categories

  • booting Process
  • linux
  • redhat

Blog Archive

  • ►  2013 (68)
    • ►  July (1)
    • ►  May (2)
    • ►  April (11)
    • ►  March (54)
  • ▼  2012 (44)
    • ►  September (20)
    • ►  August (1)
    • ►  July (4)
    • ►  June (12)
    • ►  May (2)
    • ▼  March (4)
      • Install IIS SMTP for a Windows 2008 server
      • Preview your site on a Windows Server with IIS 7 H...
      • Configuring FTP and FTP Firewall Settings in IIS 7
      • Create a new site in IIS 7
    • ►  February (1)
  • ►  2011 (1)
    • ►  February (1)
  • ►  2009 (9)
    • ►  September (3)
    • ►  August (2)
    • ►  June (1)
    • ►  May (2)
    • ►  March (1)
Powered by Blogger.

About Me

Unknown
View my complete profile