Using other web servers
Written by Joseph Ottinger
The first thing you should ask yourself is "Do I really want to?" Assuming you've answered this positively... it depends on what you want. (Note that "Apache" here is interchangable with IIS, Resin, or any other web server.)
If you want to have apache act as web server and Orion only as EJB server, you can remove the default web site server from Orion or move it to another port than 80 and have the EJBs accessed from application-clients. (To do this, they'd specify the JNDI locations for the EJBs manually or via properties, instead of just using the default initial context.)
If you want Orion to serve part of your site's context and let Apache serve the other part (like Orion serving JSP and Apache serving html, gif, PHP, CGI or something else) there is a TunnelServlet provided, which is still in beta and not documented, but you can test it to see how it works for you.
You set the TunnelServlet up like this (you can see how it's set up for some applications already, in $ORION/global-web-application.xml):
<servlet>
<servlet-name>tunnel</servlet-name>
<servlet-class>com.evermind.server.http.TunnelServlet</servlet-class>
<init-param>
<param-name>targetRoot</param-name>
<param-value>http://localhost:8080/</param-value>
</init-param>
</servlet>
(This is assuming that Orion is running on port 80 and Apache on 8080.)
Then you would add the mappings for the content you want the other web server to handle:
<servlet-mapping>
<servlet-name>tunnel</servlet-name>
<url-pattern>/*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>tunnel</servlet-name>
<url-pattern>/*.gif</url-pattern>
</servlet-mapping>
These two sample mappings make the other webserver handle any *.html and *.gif requests.
Copyright © 2007 IronFlare AB