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:
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:
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
You just have to create a folder in c: --> inetpub --> wwwroot than just type localhost/yourprojectfolder..
Related
Recently I have started using vagrant for Wordpress development.
The installation process and everything else went well. But when i try to access the page I get to see this:
enter image description here
It also loads really slow. Any ideas?
To be able to resolve salesacademie.dev, you will need to add the name to your hosts file. The line you need should look something like
salesacademie.dev 127.0.0.1
With that change, you should be able to download the assets (and the site) using that name assuming that vagrant's port forward is for port 80 (the standard http port).
Alternatively, you can reconfigure your Wordpress to not use the name salesacademie.dev but 127.0.0.1 instead. Then, you don;t need to edit your hosts file. However, you will not be able to run several websites concurrently on your vagrant server then.
I can get a website to run locally on "localhost" but I have more than one website I want to run locally and trying to set one up as dev.dfwcraftbeer but for some reason it doesn't work. I get "ERR_NAME_NOT_RESOLVED" from Chrome. Here was my process for setting it up:
"add website"
site name = "dev.dfwcraftbeer"
Physical Path = "C:\inetpub\wwwroot\dfwCraftBeer\dfwCraftBeer"
Binding = "http All Unassigned port 80"
host name = "dev.dfwcraftbeer.com"
I'm using IIS on my windows 10 laptop.
Why will it not come up? What am I doing wrong?
It sounds like you need to edit your host file. So that that domain name will resolve to your local machine. Just add your domain name dev.dfwcraftbeer.com to the hosts file and point it to 127.0.0.1. See the link to find out how to do it.
I am following this tutorial and four minutes in he simply runs the application- after I do the same I get "web page not available". I did everything like him and set override application root url, I set the start URL and then set the applicationhost.config like he did:
<binding protocol="http" bindingInformation="*:80:www.onenotedemowebsite.com" />
Of course before I did any of those things, the MVC application worked fine while the binding info was left to localhost.
Can I get any suggestions?
I suspect you didn't add the url to hosts file like they did in the video.
Open the file: C:\Windows\System32\Drivers\etc\hosts in Notepad(open as administrator).
Add the following line:
127.0.0.1 www.yoururl.com
Save and close the hosts file. Restart the browser and try again.
Have you changed your hosts file?
%SYSTEMDRIVE%\Windows\System32\drivers\etc\hosts
You should put a redirection from localhost to the site like this:
127.0.0.1 www.onenotedemowebsite.com
//EDIT: Was to late...
I was wondering, I regularly set up a new Drupal site in Nginx, I download the files, get the database in place and then.... I wait... for the DNS to resolve because I have no idea how to access the site without going through the domain name as stated behind "server_name".
Does anybody know how to access all the sites in sites-enabled without using a proper domain name?
The simplest way is to resolve domain name to IP locally. You can use hosts file for it. Just edit /etc/hosts file if your home OS is Linux, or C:\Windows\system32\drivers\etc\hosts if Windows.
Add ip.of.ur.sever domain.name.com line, save file and restart browser.
I need to put a file at this address: http://localhost:51547/file.txt
What folder would I put it in on C:/?
Tony
If I understand your question correctly and you're trying to expose a file via the ASP.NET development server at that location (http://localhost:51547/file.txt) I'm afraid the answer is not quite to your liking.
Basically I don't think you can serve files from the root of the ASP.NET development server (i.e right after the localhost:port/ part - the port is automatically selected by ASP but you can also manually configure it). ASP.NET automatically creates a virtual application path right after localhost:por> and so you're most likely going to be limited to serving files from the virtual application folder. So, assuming you web application name is: "testApp", if you put a file called file.txt in the directory where you're storing the source code for "testApp" it will also become available when you're testing at: http://localhost:port/testApp/file.txt (note the testApp in between the host-name & port, and the file-name)
UPDATE
In light of you comment, here's something you could do. You could try to get a simple HTTP server installed on your development computer and have it serve files on a different port (say port 8000). In that case you would serve file.txt using this secondary HTTP server and it would be accessible at: http://localhost:8000/file.txt.
You could try to install Apache or use IIS which comes with Windows. For Apache, the quickest way to get it going would be to install a WAMP environment. You may also try Lighttpd, and also note that MySQL or PHP are not required at all if you're only serving static files.
Any folder you want. The port designator is specified in IIS itself.
http://support.microsoft.com/kb/149605
I suggest you that if you want to do a site(HTTP) is better to use the port 80 or to do a redirection for another port, remember too that localhoost is a loop back and also take a look at PortForward to check some ports that are used by specific applications and types of servers, and please improve your question.
Regards.