I am using Apache HTTP server as a web server in front of WebLogic Application Server. I've integrated these two using mod_wl_22.so plug-in with some configuration in httpd.conf file - now I can access an application deployed on WebLogic Application Server using Apache HTTP Server URL, in other words, the actual URL (WebLogic Application Server URL) to access application localhost:7001/testproj/index.html can be accessed with localhost/testproj/index.html URL (Apache HTTP Server URL) also.
The requirement now is to configure a custom filter (or something), preferably in Java, in Apache HTTP Server so I can modify "form post data" before sending it to WebLogic Application Server. I didn't find any example/help regarding this as of now while googling.
Please let me know if anyone has done this before.
Thanks.
After googling I now have a feeling that Java is not supported in Apache HTTP Server hence I can't write filter (or servlet) in Java. Is this true?
I also found that mod_perl can help me with this problem.
Related
Assuming I am using framework like Flask to serve requests, I understand that web server handles static file requests and directs any program execution requests to the app server. Example: nginx. Where as app server can handle both static files as well as program executions. Example: gunicorn.
It makes sense to have a web server to handle static files, caching, request redirection, load balancing. The request first comes to the web server and it knows how to handle it and redirect any program executions to the app server.
However, in architectures where we use orchestration and containerization, that is - there is cluster of nodes, each node running a container - assume the container has got only the app server (example: gunicorn), and the request arrives at the API management/gateway(which has same features as a web server - other than serving static files), gets redirected to the cluster of nodes (which does load balancing), eventually the request reaches a node containing the appserver (example: gunicorn) that serves the request.
Is there any benefit of having a web server running along side an app server inside such a configuration?
In azure does API gateway play the role of webserver equivalant?
It depends. It's common to have some proxy / routing logic (e.g. url rewrite) in the API Gateway, so probably this is why you can have the app server and the web server inside a container.
In Azure, API Management is a fully managed API Gateway which allows you to implement caching, routing, security, api versioning, and more.
More info:
https://microservices.io/patterns/apigateway.html
https://learn.microsoft.com/en-us/dotnet/architecture/microservices/architect-microservice-container-applications/direct-client-to-microservice-communication-versus-the-api-gateway-pattern
If I host my Kestrel-based ASP.NET Core website with UseIISIntegration behind IIS, should the Server response header still say that I'm using Kestrel? Because it seems that it is:
Is it a correct behavior?
Short answer: Yes, it should still report the application as hosted by Kestrel.
When you use IIS to host an ASP.NET Core application, you're really using IIS as a reverse proxy to Kestrel. This is the approach recommended by the documentation:
If you intend to deploy your application on a Windows server, you should run IIS as a reverse proxy server that manages and proxies requests to Kestrel.
An incoming request will be handled first by IIS, and then passed on to Kestrel, like this:
Web -> IIS -> ASP.NET Core module -> Kestrel
So it's still accurate to say that Kestrel is the server handling the request. IIS is just sitting in front, helping Kestrel deal with the incoming traffic. You can check whether the site has been set up and assigned to an app pool in the IIS Manager if you want to determine whether it's using IIS (which should be the default).
Not exactly the answer to the question, but since Google gave me this related answer to my question it might help some people:
To remove this "server" header, an option has been added to the Kestrel Startup Options, so in program.cs you can remove it by adding the following option:
.UseKestrel(o => { o.AddServerHeader = false; })
Documentation (quite poor)
I am new to AX and a beginner to IIS (and first post on stackoverflow). I need some assistance with AX 2012 AIF Web Services and configuring an http AX Inbound Port.
My issue is in trying to activate an Inbound Port within AX using HTTP. I receive the following two errors:
The deployment web site was not found for port: TestOrdImport
The port ‘TestOrdImport’ could not be deployed.\nError: The deployment web site was not found for port: TestOrdImport
This is in a test environment using the Microsoft issued AX 2012 FP1 hyper-v image. Someone else installed the web services using the instructions found here: https://msdn.microsoft.com/EN-US/library/gg731848.aspx
Based on the person who did the install for the web services I created a new entry in the web sites screen using a virtual directory share path of “C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\” and URL "http://AX2012-A:85/MicrosoftDynamicsAXAif60"
I am not sure if these are correct the but the web site validates without error. The web services appeared to be installed into site “AIF” rather than the “Default Web Site”
Does anyone see any issues with the IIS configuration of sites? Should the web services been installed into the default web site rather than AIF site?
When creating the Inbound port it needs to be http as I am setting this up per someone’s request but again I cannot get the inbound port to activate and could use some guidance.
https://i.imgur.com/cl8jGVJ.png
I was able to get someone with AX experience to resolve the issue using the HTTP inbound port adapter with AX and the AIF Web Services.
Some key points related to my issue and setting up the inbound port in AIF with the configured AX AIF web sites that might be helpful to others in a similar situation:
Notes on setting up the AIF web sites within AX:
To get the correct folder (virtual directory) for the actual IIS
server setup, you must use IIS to find the association (Virtual
server -> physical disk path).
The URL must be a valid reference to a real HTTP server that will be servicing this service (port 85 in my case; not port 8101). The AOS hosted WCF services is configured for port 8101.
Notes on setting up the HTTP Inbound Port within AX:
The site path in the URI for the Inbound port did not match any path
defined in the “Web sites” configured. The text string must exactly
match from the “http://...” beginning through to the inbound port
name (“TestOrdImport/xppservice.svc” portion), using port 85 in my
example and no “/Services/” in the path since that was for the basic
inbound ports and “Services” sub-folder is not configured for the IIS
virtual server. In fact, if you attempt to setup the web site
configuration with the “Services” sub-folder so that it matches
correctly there, the web sites form will give you an errors since
“Services” sub-folder does not exist and if you create it, it does
not have all the other support files that were installed (the “bin”
folder and such).
When deployed successfully and when I use the WSDL URI in the web
browser, I get back a page stating “You have created a service….” And
tell you some basics on how to use it (this shows it is installed
correctly). For HTTP services you always add “?wsdl” to the URI to
get the actual WSDL document so this URI/URL works correctly for
that: http://ax2012-a.contoso.com:85/MicrosoftDynamicsAXAif60/TestOrdImport/xppservice.svc?wsdl
It is not much but I hope this helps someone else. Much of the above was written by the person who helped solve my issue.
This may also be caused by a trailing slash character (/) in the website URL field.
Removing it may resolve this error message.
Source: https://community.dynamics.com/ax/b/axdilip/archive/2015/06/23/troubleshoot-dynamics-ax-2012-aif-error-the-deployment-web-site-was-not-found-for-the-port
I have an ASP .NET 3.5 + Silverlight 3 web site hosted on Win Server 2003.
The url is of the following form:
https://test.website.com:31443
The Client Access Policy has been placed in the inetpub/wwwroot folder.
I have changed the TCP port to 31080 and SSL port to 31443 in the virtual directory properties (required by the client).
The client access policy has been verified and works for the default port 80 and 443, when a request is made to a Silverlight enabled WCF service from the Silverlight client.
However, after changing the ports (as above), Firebug shows Aborted when the clientaccesspolicy or crossdomain file is requested by Silverlight runtime.
The XAP download works fine and has the port appended to the URL.
But for the clientaccesspolicy file, the url does not have the port appended in the request.
To sum up the following works:
https://test.website.com:31443/clientaccesspolicy.xml
But the Silverlight runtime is trying to request the following which does not work and gets aborted:
https://test.website.com/clientaccesspolicy.xml
Thanks in advance for any help!
I think the behavior you are seeing is by default. The Silverlight runtime will only request the clientaccesspolicy over HTTP to port 80, or TCP to 943. If the Silverlight application is run as a trusted app, I think you can get around these restrictions.
Blog Post
Issue on Microsoft Connect
Is there any way to configure IIS 7 to transfer a request to another server in a similar way to how the Server.Transfer() method works in ASP.NET.
Judging by your comment under jsobo's answer:
I have two servers, first server was
installed windows server 2008 and can
access from internet and second server
was installed windows server 2003 but
cannot access from internet. Unlucky
my website can only run on the second
server so I want to transfer request
from the first server to second
server. Do you have any suggestion for
me?
I think the IIS Application Request Routing module may be the answer here:
Application Request Routing module on IIS.NET
You could install this on your internet facing Windows 2008 server and have it route requests to and from the Windows 2003 server.
Your best bet would be to actually do a response.redirect however if the request was a post and not a get then you have problems as the post data will be lost... your options are to proxy the request to the other server or to make a response to the client that writes an autoposting (via javascript) form. Both options are a bit of a hack.
The question I have is why you want to transfer the request to another actual server.
You don't want to do a transfer which silently redirects and then forgets, you want a proxy which handles the response as well.
Apache with mod_proxy can do this.
http://httpd.apache.org
A better choice though would be fixing the wacky setup. Why can't the app that needs to access the internet not be on a computer that can access the internet?!?