Link to home
Start Free TrialLog in
Avatar of jct_777
jct_777Flag for Kuwait

asked on

Windows Server 2012 & 2008

Dear All,

How to create a website  for internal use in windows server2012 & server 2008.
after creating I want  when we type the site address in the browser it should automatically redirect to a particular ip.

Example I want to create a website with the name Test.net & this address should redirect to an Ip i.e. 192.168.10.56.

Please help me in doing this.

Regards,

JCT
Avatar of David Paris Vicente
David Paris Vicente
Flag of Spain image

Hi.

First of all you have to had an DNS server to resolve the IP to the name of your site, this role can be add in 2012, 2008 or in both.

Next you have to install IIS server you can also install this role on 2012, 2008 or in any other machine that will have the IP that you want.

Do you have a Domain on your infra structure?

Please tell us more about your IT infra structure.

Do you already have your website?

Regards
You can do two things.

You can host file it or you can go into the website in IIS and put the IP address against a website name.

More details:
-In IIS 7, go to the website and click on it on the left.  
-Clcik on "Bindings" and assign the type of website (ie. HTTP or HTTPS), give it the IP 192.168.10.56 and the port.  Then ensure you put the name of the website on the host name.

*NOTE:  The IP 192.168.10.56 needs to be added as a SECONDARY IP on the NIC.  In order for the clients to hit the website, you either need to create a DNS entry with the website name (something.contoso.com) with that IP or hostfile it directly on each machine.

Cheers!

-Esteban
Avatar of Lee W, MVP
Unless you own Test.net, you shouldn't use test.net (you're probably just using that as an example, but to be clear, you shouldn't use any domain that you don't own and/or that you intend to allow people outside the organization to have access to - it can create problems with your DNS.

Second, this is not a web site issue you're asking about - it's a DNS issue. You need to set an A record in your DNS server so that when the server finds someone wants to go to test.net, it provides 192.168.10.56 as the ip address of test.net.  It's not a redirection, it's a lookup.

As for creating the web site, there are BOOKS on that and it's simply not productive to explain in excruciating detail what so many books have already done.  In short, you install IIS and create the web site there.  If you need specific help with aspects of this, feel free to ask.
And GranWizzard makes a good point.

This is on the assumption that you have a domain.  If you are doing something small within a workgroup, then hostfiling on each computer.  Hostfile is under C:\Windows\System32\drivers\etc folder.  You have to tell it to "show all files" and use notepad to create the entry on the hostfile.  Be sure that you open notepad by right clicking in and "opening as administrator" because if you don't do that, then it won't work.  The entry has to be done in the server AND each computer within the workgroup if you go that route.

If you have a domain, it is ten times easier to put the entry as a local DNS entry; assuming that you have the zones created for the domain (website).

-Esteban
I assumed the IP of 192.168.10.56 was the IP of the server.  If it's not and you need to add it, then you should NOT blindly do so - if this is a DC as well, that can create issues.  If it's an SBS server, it can create issues.  More information is needed.
estebs1978 is also point one of the solutions, but as you asked for Win 2012 and 2008 I didn´t assume that you  could use the host files or want to do a small lab.


Also what  leew said is true, so give us a more detailled information.

Regards
Avatar of jct_777

ASKER

why I asked for server 2012  & 2008 because in my office windows server 2012 is installed & domain is also configured. In my home for test purpose I installed windows server 2008.what I need to configure in my office first I do it here in my home then if it is success I implement in my office.

I am totally new to Windows server. so I have plenty of doubts.

One of my officer came & gave me site address name & the ip. he told all the users cannot remember the ip address so when they type a particular site address in the browser  it should automatically go to the particular ip.

in my office server 2012 is configured with domain. total no. of users near to 500

How should I do this configuration.

if you all need any information  please mention I will provide.

Regards,

JCT
For 500 users you need to use a DNS entry.  Ask whomever is in charge of the domain controller that handles DNS to create an "A Record" with the website name that the designated IP.

On your end, in IIS, you create the website and bind that IP address and give the hostname in the binding.

Here is a link to TECHNET that tells you how to create a website step by step (hopefully I won't get in trouble for putting a link that goes to Technet).

http://technet.microsoft.com/en-us/library/cc772350(v=ws.10).aspx

This is a general guide.  We can walk you step by step if needed.  First of all, you need that A Record created and if they don't have a zone created (forward or reverse lookup) then the person who works on the domain controller will have to create it (which is not hard).

-Esteban
Hi jct_777.

NOTE: First I suggest you to use the same subnet on all lab infra structure.

1º - For your home environment on Windows 2008 you have to prepare it to be a Domain Controller follow this -> Step by Step Windows 2008 Domain Controller don´t forget to keep the same machine name and the same domain name equal to your office environment and of course the IP´s, this is not mandatory but as you said that you want to replicate the office infra structure.

2º After the installation of the Domain Controller you will need to Add the DNS Role follow this -> Install DNS Server

NOTE: On Every computer, pc, laptop and Domain Controller you have to point your ethernet card to the DNS server, for that go to the networking properties -> Networking IP V4-> Choose use the following DNSserver Address -> Insert the IP of the DNS server, in this case is your Domain controller.

Now lets do a simple test and see if your DNS is solving names.
From the domain controller go to command line interface.
ping the name of your domain controller Ex: ping mydomaincontroller if the name is solved to an IP, it´s Ok.

On another PC/Laptop do the same test and also this one ping -a "theipofmydomaincontroller" if the the IP is solved to a name you are ready to go.


Because is not a good policy to install IIS in the Domain Controller you can install IIS on your machine (PC/Laptop) for that follow -> Installl IIS on Windows 7 or Vista

Now check the IP of your IIS server and go to the DNS Server and see if any Host (A) record is created with that IP on the Forward Lookup Zones, if not create a Host (A) record give the name and the IP of the where is installed the IIS Ex: mypcname on the name field, and the IP xxx.xxx.xxx.xxx you the IP field.


Now create an Alias(CNAME), on the Alias name put your site name, as you mention this is for intranet, you can put on this field Ex: intranet, on the FQDN field insert mypc.mydomain.something.

Now lets check if everything is working.
Open command line interface:
1 º ping mypcname -> If the name is solved to an IP is OK
2º ping -a mypcip ->  If the IP is solved to an Name is OK
3º ping intranet or website name ->if you receive the replies it´s working your DNS server.

For the Office, is every thing very similar except that you will have an IIS server not in your PC/Laptop but in other machine that belongs to the the Domain.

If you have more questions or issues post it here.

If I missed something or is any other point o view of other Expert please make the suggesting or alteration of my method

Regards
Avatar of jct_777

ASKER

Dear All,

Thank you very much for the support you all are providing to me . as i told before server 2012 setup  is done by another person . he already left the comapny.  so when i called him yesterday regarding the help  he told me he cannot help because he is not in this company anymore. search in the google  & do by yourself n also i am new to this server side.  so whatever small issues will be a big issue for me.  

As friday & saturday is weekend here so i am trying to test it in my home pc & if everything works fine then on Sunday i can inplement this in my office.

Please tell me from where i have to start in my home pc. already server 2008 with dc configured & also some users created. now what will be next step needed to configure my website & from there redirecting to a particular IP .



Regards,

JCt
Follow my post above.
And discard the first step, because as you mention you already have a DC.

Start from the second point.

Regards
Avatar of jct_777

ASKER

I will do as you suggested  & will update regularly.

Regards,

JCt
Avatar of jct_777

ASKER

Dear Granwizzard,

Thanks once again for the help.  after creating the DNS server .

typed the ping command & tracert command in cmd prompt. Attached image has the details.

test.com is my domain.

website is kuwait,hr.test.com & the ip is 192.168.181.140.
as you mentioned in the client side i configured the dns server . from client i can ping to domain.

What is the next step that i has do.

Regards,

JCT
website.jpg
The DNS server is working because as you can see the name is resolved to an IP.

Now do you have a physical machine or a VM with the IP 192.168.181.140?

Because the destination is unreachable, this can be for several reasons, this issue can happen because of :
The address doesn´t exist on the network
The machine is off
The firewall is on and blocking traffic.

Can you put here the Ip of the domain controller, and all machines that you have on your network.
Also do an IPconfig /all from the command line from the machine with the IP 192.168.181.128 and post it here please.

Regards
Avatar of jct_777

ASKER

Hi Good Morning ,

I don't have any physical machine with the IP 192.168.181.140. do you want me to give it to any physical machine. if yes then i will create another physical machine with the IP mentioned above.

The IP of the domain server is :-192.168.181.128
windows 7 machine is having the ip 192.168.181.132
& xp machine is having the IP 192.168.181.136

I did ipconfig /all for the ip 192.168.181.128 which is my domain the result is attached.

Regards,

JCT
DC-Details.jpg
Ok.

Can you change the ip of the windows 7 to 192.168.181.140?

If yes do that.

Now if you ping you will see the reply from 192.168.181.140.

Do you already install the IIS?
Avatar of jct_777

ASKER

ok. i configured Windows 7 pc with 192.168.181.140
Now I can ping with the name & also IP. Attached is the details.
IIS 6.0 is installed in Windows server 2008.

Regards,

JCT
Ping.jpg
DNS is working and responding to the name of your website.

Now you open your bowser and insert on the browser address:  192.168.181.140 to check if the IIS server is receiving requests on port 80.

If its working then will appear an IIS page on your browser.

Config your website on the IIS and then insert on the browser address the address of your website.

Let me know.
Avatar of jct_777

ASKER

Hi Granwizzard ,

When I am typing the the name kuwait.hr.test.com in the browser in the server IIS page is opening.

now where I need to configure the website is it  in server . If yes then how to configure.

Regards,

JCT
ASKER CERTIFIED SOLUTION
Avatar of David Paris Vicente
David Paris Vicente
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jct_777

ASKER

Hi,

I have attached few immages. i have not created any website. tried & you can see one in attached. when i am doing right click in the default website there is no option with new one. only add a website option is there. what to do. i am having little bit confusion here.

Regards

JCT
Website-1.jpg
Website-Error.jpg
I thought that you had IIS 6 and not IIS 7, no problem.

First delete your web site from the IIS and from the Application pool.

Then On IIS server managment right click on sites- > Add Site

On site name input ->  kuwait.hr.test.com

On the physical path -> choose the path that matches with the folder where your web site is located.

On the ip choose the IP of your domain controller, in your case is 192.168.181.128, has you decide to install your web server on the domain controller, we have to change the DNS record, but we will do that later on.

On the host name input -> kuwait.hr.test.com


Ok it´s done.

Now open your DNS server management, delete the record that you have created before. that will be Kuwait.hr

Now you are going to create New Alias (CNAME) Again.
Do that create New Alias (CNAME) but in the Full Qualified Domain Name you have to insert your domain controller's machine name:
Ex: in  your case i believe is domain.TEST.com

Do the ping tests to the  kuwait.hr.test.com, if the ping reply then try to access to the web site.

Let me now if you have more issues.

Regards
Avatar of jct_777

ASKER

Hi Good Morning ,

I will do as you said & will keep you updated.

IIS in my home server is version 6 & in office is version 8

Regards,

JCT
Avatar of jct_777

ASKER

I will do it in my home Server & will keep you updated.

Regards,

JCT
Avatar of jct_777

ASKER

Hi

I did as you mentioned above. deleted kuwait.hr , then created a new site also created a CName .
& did pinging kuwait.he.test.com . the reply is comming from 192.168.181.140.

But when i open the browser & type kuwait.hr.test.com IIS webpage opens

Regards,

JCT
When you create the new web site did you configure the path to the directory that matches to your web site folder?

I´m a little confuse, in what machine name and IP is the IIS server?
Avatar of jct_777

ASKER

Dear Granwizzard ,

thanks once againg for the supoort you provided to me.  everything is working fine.

Regards.

JCT
Great, I'm glad I was able to help you.

Regards