Retrieve Web Server Request URL in Application Server - url

I have below scenario. I have a Application running in an App Server
behind a Web Server
Web Server <---------------------------> App Server
url: http://webserver url: http://appserver:7012
Now when I do a request.getRequestURL or URI in my Servlet Filter.
I get the App Server Url (http://appserver:7012) not the
Web Server Url(http://webserver).
I need to get the Web Server url not App Server url. How do I get it ?
Any suggestions on how do I go about it.
Thanks!!!
SKR

Related

Creating HTTPS server in iOS device

My requirement is running a HTTPS server on the device it won't connect to the external clients. Both client and server is my application only.
For example, if there is a request https://myip/getUserData from my app, my app fetch information from core data and returns to the client(that is also my app)
I was able to create an HTTP server in my app following the below link. but I want the same in HTTPS. That means to run the HTTPS server.
http://www.cocoawithlove.com/2009/07/simple-extensible-http-server-in-cocoa.html

Redirect Users if they try and access the application on the wrong server

I have an MVC application, and my company has their own web servers that we publish to. Now, this application is on server x.. but I have since published it to a new web server (server y). If user's try and access the application on server x, I need them to be transferred to server y... or at least give them a message stating to go to the new URL.
Is there a way I can do this within IIS Manager on server x?

Determine IP Address outgoing request comes from

If I have a link in an MVC application hosted on Azure:
Call web service
At the moment we are having difficulty connecting to the URL, which is a SOAP web service. We get an error 'site cannot be reached'.
Just to rule something out - what IP address would the service see this request coming from - my local (browser) or the server?
The request would come from your IP.

What approach to be used on application side in migrating web services to HTTPS from HTTP?

i have an app running on Apple app store with webservices from HTTP Server but now i want to migrate my webservices from HTTP Server to newly brought HTTPS Server. What is the best approach to achieve this without affecting older application users running application on HTTP Server?
P.S: After migrating to new server, older server will not work.
Edit: my older server domain is going to expire and also i have amazon server on which i am going to move my webservices. So the older and new server link are different.
Thanks

Web Server and App Server

I just want to know that how the web server call to app server code and pass the response to the client, Eg :-
Nginx web serve
Unicorn app server
Rails application
Our request sends to web server and how web server(nginx) pass that request to the app server(unicorn) and how app server runs the rails code or route and sends back the response.
To understand the collaboration of a web server to an app server you must study the architecture of the server first. I guess this link will give you a good idea about architecture and it's bonding.
Have a look here:

Resources