I uploaded two websites on a single IIS local server. One that hosts a WFC service other that consumes it
I know that using host header to distinguish them in not an option without a DNS server, so I gave the first one an all assigned IP ad the second one 172.20.1.44, whenever I try to browse to it locally it gives me the connection timed out
how could I browse to the second site on my local machine to test it
Put them on different ports. Put one site on * 80 and the other on * 8080. You can modify the port in the binding screen of IIS.
Related
I have googled this and found a lot of posts, but no definitive answer.
Basically, I want to play with making websites and set up a local virtual server with only IIS (v8.5) installed. It's not connected to the internet and it's purely for self education.
The problem is that I have sites working, different sites on different ports. All of these are viewable in a browser on the server if I use http://localhost:port-number as per the site's binding.
I can live with this - but I'm curious as to why, if I substitute the localhost with the server IP, or the loopback address the page can not be found. Clearly IIS is working as it serves pages with localhost.
I have added multiple bindings to a site so that 'all unassigned' the server ip and the loopback are bindings for the site on port 80.
As per some posts I've used CMD to add netsh add iplisten.
netstat - confirms the server ip is listening on all the ports of the websites created (3 sites, each with a different port number)
Firewall is disabled as it's only virtual server with no internet access.
I'm aware I can add a domain address and put this in the hosts file, but I'm really just curious as to why I can't browse the sites hosted in IIS locally by the server's IP or loopback.
Thanks in advance
I am using asp.net5 web project hosted in console app.
It works fine on localhost, but when i try to access this website form different machine like http://192.168.1.5:5432 etc., i get ERR_CONNECTION_TIMED_OUT.
I was trying several arouches like chaning localhost to machine name but none of them works.
hosting.ini file:
server=Microsoft.AspNet.Server.WebListener
server.urls=http://localhost:5432
Is there any solution for this problem, or hosting in console app is only made for development purposes
Because you have bound your listener to localhost it will only accept connections to (and from) localhost. localhost is special here as it will (at least for Kestrel) always bind to localhost/loopback interface. Everything other than localhost binds to all network interfaces.
If you want it to be reachable by all IPs and be host/domain agnostic, you have to use http://0.0.0.0:5432 (or alternatively http://*:5432). If you do http://www.example.com:5432, then it will be reachable from all IPs but only if the host name was typed in the browser so http://192.168.1.5:5432 still won't work (unable to test the last one right now, but * wild card url should still work).
This way you can run multiple asp.net core applications on the same server but but with different hosts/domains.
You can also run two applications on the same domain and same port, if you bind them to different endpoints.
For example http://www.example.com/App1 and http://www.example.com/App2, use same port and same domain but different endpoints and two applications.
Edit
Addition information for windows users. You may have to add an exception to the change the local security settings to allow dnx to bind to this port/host (or run it as Admin which would be discouraged), especially when using host and low-numbered ports (80 and 443 respectively).
netsh http add iplisten ipaddress=0.0.0.0:80
netsh http add urlacl url=http://+:80/ user=Example\Username
This will allow applications for the user "Username" in the domain "Example" to start listening on port 80.
I have few PCs in same network. One of the machines (ip: 192.168.1.110) is already hosting a WAMP server which is accessible through an external IP. I now want to install WAMP server on one more machine (ip: 192.168.1.120) and make it accessible through external link. But this new machine is not getting accessed through external link. Is there any configuration related stuff that I need to do in httpd.conf file to make it happen?
There are a number of issues with your idea of using a second PC running a second WAMPServer. Not that 2 machines and 2 WAMPServers is a problem.
First, I assume your router has already had port 80 "Port Forwarded" to the original PC's IpAddress (ip: 192.168.1.110). It cannot be forwarded to 2 different internal IP addresses, unless you tell people to use a different port number for the second sites domain name so that you can forward that other port to your second PC's port 80.
This leaves you a couple of possibilities :-
You either setup the original PC's Apache as a Proxy for the second PC and therefore forward accesses for the second site to the second PC while still running the first site on the first PC
Or, more simply in my opinion you stay with One PC running WAMPServer and you make use of Apache's Virtual Hosts capabilities.
This way as long as you have 2 seperate domain names, both pointing to your Routers WAN IP address both can still use port 80 i.e. Users dont need to add a port number. Apache will decide what site is required and run that site by simply looking at the domain name and redirecting everything to the right place.
See this post for some help on how to setup Virtual Hosts in WAMPServer
Its should only take a few minutes to setup.
Yesterday I created an Azure Virtual Machine using the simple Win2008r2 + SQL2008r2 image.
I have deployed a website to the VM via an RDP session.
I am able to browse the website locally (via RDP) using
"http://localhost"
I understand that I need to add an Azure endpoint for port 80 to enable me to browse to the site from an external machine.
I have configured the Windows Firewall on the Azure VM to allow traffic on Port 80 inbound and outbound.
Could anyone please advise what I've missed or what I can do to troubleshoot?
---Update-----
I have learned a little more this morning. The website that I'm trying to host on the VM is an installation of Interwoven Teamsite v7.3.x. When I looked in IIS I could see that the "Default Web Site" was stopped. Another website called "TeamSiteSitePubPreview" had been created but was only bound to port 81.
So, what was presenting the website I could see when I browsed to
http://localhost locally?
I ran netstat -ano and this showed me that PID 1604 what listening on port 80. I then ran Process Explorer which told me that PID 1604 was allocated to "Appache HTTP Server".
I know nothing about About Appache, can anyone tell me if there's some Apache config that will be preventing connections from outside of the local server?
For reference, I just tested this sequence and it gives you a website accessible over the Internet:
Create a new Windows Azure virtual machine with the Windows Server 2008 R2 SP1 image.
Add an endpoint on public port 80, private port 80.
While the endpoint is being created, start setting the server up.
Remote Desktop in.
Add the Web Server (IIS) role with default settings.
Test the connection. You should get a HTTP 200 OK status.
If you want to troubleshoot your server, start checking for errors in the event log. Check also the website bindings in IIS (Port 80, IP Address *).
Also consider the connection issue might be on the client (your) side. For instance, DNS caching. Try connecting from another machine with direct Internet connection (such as another cloud server) or from a service such as isup.me.
Additionally, if all you want is to host websites in IIS, the Web Sites service has a more streamlined experience.
You will need to create an endpoint on port 80 thru Windows Azure Management portal as well. This endpoint opens a port in the Windows Azure Load-balancer.
Navigate to your VM within the portal and create a new Endpoint under the Endpoints screen of VM configuration within Azure management portal.
If I log in to our web server using RDP, I can't access any of the sites we run on that web server via their external url. For example, say my web server hosts www.example.com, when I log in to the web server, bring up a browser and try to go to www.example.com, I can't see it.
However, one of our sites was configured in some way to work like this, if I try to go to that url, it works as you might expect.
Unfortunately, this was done by our server hosting partners, who we are no longer in contact with. Does anyone know how this can be achieved?
You can do it in many way..
It depends on your network configuration, but it could also be a simple row in hosts file or a static dns record or a specific route for that ip address.
if you're using IIS you should also set the website to "listen" on the loopback interface in the bindings menu.
or, for IIS 6: