4.4.1. Apache HTTP Server¶
Topics
4.4.1.1. Use of mod_proxy/mod_rewrite¶
Here the setting for linking web server and intra-mart Accel Platform is made using the Apache module (mod_proxy/mod_rewrite) and not using the integrated module of Resin.
4.4.1.2. Obtaining mod_proxy/mod_rewrite¶
Please refer to the manuals of product vendors.
4.4.1.3. Placement of Static Files¶
Please decompress the [Static File], which was obtained from im-Juggling, to the apache document rule.Please refer to Static File Output for information about the output of static files.
4.4.1.4. Editing apache Configuration File¶
Open <%APACHE_HOME%/conf/httpd.conf> file.
In the Dynamic Shared Object (DSO) Support Area, please add the following setting or comment it out.
LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.soPlease add the AllowEncodedSlashes directive and the settings of mod_proxy and mod_rewrite at the bottom.
Context Path
imart
apache Document Root
/usr/local/apache/htdocs
Expand Folder of Statis File
/usr/local/apache/htdocs/imart
IP Address
192.168.1.1
Port Number
8080
Settings needed for the example above are as follows :
AllowEncodedSlashes On RewriteEngine On RewriteCond %{REQUEST_URI} ^/imart/(.*\.gif|.*\.GIF)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.png|.*\.PNG)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.jpg|.*\.JPG)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.css|.*\.CSS)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.js|.*\.JS)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.swf|.*\.SWF)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.ico|.*\.ICO)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.json|.*\.JSON)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.jar|.*\.JAR)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.xml|.*\.XML)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.yaml|.*\.YAML)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.txt|.*\.TXT)$ [OR] RewriteCond %{REQUEST_URI} ^/imart/(.*\.html|.*\.HTML|.*\.htm|.*\.HTM)$ RewriteRule ^/imart/(.*)?$ /imart/$1 ProxyPreserveHost On ProxyPass /imart/ http://192.168.1.1:8080/imart/ nocanon ProxyPassReverse /imart/ http://192.168.1.1:8080/imart/ nocanonNote
File extension specified as above will be the one necessary for the static file in intra-mart Accel Platform Advanced_Version+intra-mart Accel Collaboration+IM-FormaDesigner for Accel Platform.If you want to handle the static file that does not exist in RewriteCond above, please add it to the description of RewriteCond.Warning
Please make sure that you include the context root of AP server in the request.If the AP server side is http://myapp/imart, please make the request URL to http://myweb/imart.Please restart Apache.
4.4.1.5. Editing the Access Log¶
In case of Reverse Proxy, every Source IP of the access.log generated by Resin will become 127.0.0.1. Output contents of access.log should be edited to avoid this problem.
Open <%RESIN_HOME%/conf/resin.xml> file.
Please add the following settings inside the <host id=”” root-directory=”.”> directive, and restart Resin.
<access-log path='log/access.log'> <rollover-period>1D</rollover-period> <format>%{X-Forwarded-For}i %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"</format> </access-log>Note
For the detail setting contents of access-log, please refer to [Resin Documentation ].
4.4.1.6. Limitations¶
For limitations, please refer to [Release Note].