Etienne Noël
Etienne Noël

Reputation: 6166

IIS - Create a local host name and use it

I'm new to IIS and I'm trying to use a local hostname to differentiate my web projects. Basically, what I want is to do something like:

http://myproject.dev

and access it directly via the web.

Normally, with an Apache server, I would create a virtualhost and I would add an entry in my hosts file.

So, I tried to do the same with IIS. I created a a website as follows:

enter image description here

In my hostfile, I then added an entry:

127.0.0.1   myproject.dev

However, when I type the address, I'm redirected to my IP Address and I can't see the website.

Am I missing something?

Edit 1: enter image description here

Upvotes: 0

Views: 324

Answers (2)

Amr Elgarhy
Amr Elgarhy

Reputation: 68892

aha, I got it, it is host file issue, just remove:

127.0.0.1       localhost

or comment it because it make everything go back to 127.0.0.1

and write yours like this:

127.0.0.1 myproject.dev

Upvotes: 2

FabioEnne
FabioEnne

Reputation: 742

You just have to create a folder in c: --> inetpub --> wwwroot than just type localhost/yourprojectfolder..

Upvotes: -1

Related Questions