Web App gets wrong IP after Windows Server upgrade - windows

We cloned the servers, upgraded to a newer version of the OS (Windows 2012) which is compatible with the web app. However, when we placed those servers in production, only the one with the load balancer was being accessible through the IP. The other 4 were not because the load balancer was trying to redirect traffic to the local IP instead of the public ones. I don't know if this is information enough, but we can't seem to find the issue since the config of the web app is the same and the IIS didn't seem to have issues. Maybe the DNS? The IP's are the same.

Related

Laravel Homestead needs to access local web server

I have the following setup in my DEV environment which is running on Windows 10 (which should be irrelevant).
Homestead with Virtual box to develop my Laravel applications
on my local OS I have a IBM Domino server running as dev1.mydomain.local
I'm trying to access the REST API on the Domino server from my Laravel installations. At the moment I'm getting 404 errors when trying because the domino server is not available from within the VirtualBox of Homestead.
Here is the network configuration of the homestead virtual box
Both webservers Domino and nginx on the virtual box are running on standard ports
Here is the ifconfig output of the virtual box
How can I make that possible?
UPDATE:
It just came to me that I am able to access the Domino server with LDAP, so perhaps changing the http and https port of the Domino server is already the answer...
I will test that and then get back here...
Changing the Port of the Domino server to 8080 enable me to access the server's REST API
dev1.mydomain.local:8080/api/data/
The connection to the local machine seems to be enable through the VirtualBox's second network adapter and the my call to the REST API got confused with the 2 web servers listening to the same port on localhost(127.0.0.1)
Update
although I was kind of able to connect to the server using the address above, still left me with the problem that authentication wasn't possible. In order to do so (and I have not the slightest idea why), I had to change to the local IP address of my PC to access the REST services
http://192.168.0.155:8080/api/data
If someone could explain that I would be happy :-)

Hosting multiple websites on the same IP address (different machines)

So, my setup is:
Windows server - Already hosting a website in IIS (web1.example1.com)
Windows 10 PC - Want to host another website using Xampp (web2.example2.com)
I don't own either of these domain names, only the subdomains (not sure if this matters)
I have got this to work by setting up another site in IIS then using a reverse-proxy, however, I ran into a problem using this method. I'm using Laravel on my windows 10 PC, and I when try to access my resources it uses my internal IP rather than the domain name (therefore doesn't work externally). I can get around this by using URL::forceRootUrl() in my routes/web.php however then I can't redirect to other sites (need to use OAuth).
I have tried searching around for solutions that will let me use both of these, but I'm starting to think using a reverse-proxy just isn't going to work for what I want.

System Proxy Settings Being Ignored by Apps

I want an app I am testing to use Win (10) OS system proxy settings. I'm watching packets on the proxy and see HTTPS browsing traffic on Chrome (I've installed a self signed cert on Win).
I can also see a few other OS requests coming through the proxy server. For some reason though, some apps don't pay attention to the system proxy settings.
Is there any way to force all connections through the proxy server? The app I'm testing uses Qt - QWebView. I found a reference here that you need to change the source to use a proxy. This won't work for me as I only have access to the production binary for this test.
How can I force an OS proxy connection, or otherwise route that traffic through my proxy?
Note my OS is in a virtual machine.
Edit: I'm wondering if editing the hosts file could route the traffic for a particular URL to my Proxy? I'm trying Acrylic but I'm not having any luck.

Reverse Proxy on Windows

I have a web server that responds to a number of different sites on port 80. Currently, IIS does the mapping to various sites via host headers, but I'd like to be able to serve other web apps on port 80 hosted in Jetty or Tomcat. IIS prevents that by grabbing all port 80 traffic.
I basically need a reverse proxy to just change the port number to something that another app stack can listen in on. I was looking into nginx but it seems to not be quite ready for prime time on Windows. Eventually I may set up a Linux box specifically for this, but for now I'm interested in a solution which will run all on the same box.
All I really need is something very light which mostly just matches hostname/port and allows rewriting of the port. Does anyone have any suggestions?
If you are running in IIS 7 or above you can use Application Request Routing for that: http://www.iis.net/download/ApplicationRequestRouting
For IIS 5-6, it looks like Apache Tomcat Connector (JK 1.2) is a clean solution. This is an IIS ISAPI filter which allows IIS to act as a reverse proxy for other web servers. It uses Apache JServ Protocol (AJP) to communicate with the app server actually serving requests. Both Tomcat and Jetty implement AJP. URLs are mapped with regex-like config to a particular AJP server instance.
Overview: http://www.iisadmin.co.uk/?p=40&page=3
IIS Config: http://tomcat.apache.org/connectors-doc/reference/iis.html
Mapping Config: http://tomcat.apache.org/connectors-doc/reference/workers.html
This ISAPI plug-in also works with IIS 7.x, but in that case the Application Request Routing (see marked answer) should be considered as it might work better with non-AJP servers.

IIS 7 and ASP.Net MVC issue

This is a bit complex - so here we go.
I am developing a mobile web application using asp.net mvc and I need to test it locally on my iPhone. So far I have the first iteritaion of the site running on my local dev laptop. I created a virtual dir for the site under IIS 7 on the same machine. I deployed the site to that folder from VS2008. I open a browser and entered "" and the site cam up just fine. I am runnig a home network with locked down WIFI and both the laptip and my iPhone are on the network. So now I want to test with the iPhone but the site won't come up when browsing to "". I have another machine that is also on the network and I get this error message when attempting to browse to the site:
"Website (laptopname) is online but isn't responding to connection attempts"
I have a feeling that this has something to do with IIS setting and \ or application pools but have not been able to find anything relavent goolging. Any help appreciated.
There are some possibilities:
iPhone is not able to resolve your laptop by name. Try using the IP address of your computer in the URL instead.
The firewall on the laptop is blocking inbound connections from other machines. Check your firewall.
The IIS Website is configured with a host header localhost so it won't respond to requests to other hostnames. Check the binding for the Web site in the IIS Manager.
To eliminate possible network issues, you can create an ad hoc WiFi network on your PC and connect to that network to test.
Check that Allow Anonymous Access is set for the site
I suspect you are not alone, as I had this exact problem. I developed a small port opener I called "SharpProxy" that may make your local testing much easier.
Overview and instructions:
http://www.codefromjames.com/wordpress/?p=97
It's open source! Get code here: https://github.com/jocull/SharpProxy

Resources