Documente Academic
Documente Profesional
Documente Cultură
PAGE 1
Table of Contents
1 Overview 2 Audience 3 What is Reverse Proxy Server 4 Prerequisite 4.1 Apache Web server 1.3.27 or 2.2.x 4.2 Sun One Application Server Version 7 4.3 C Compilers to compile Apache 4.4 LibXML version 2 5 Apache 1.3.x Configuration 6 SUN One Configuration 7 Apache 2.2.x Configuration 8 Log Monitoring 4 5 6 7 7 7 7 7 8 9 10 12
Revision History
Overview
This document provides details of setting up Apache web server on UNIX operating system as reverse proxy for Sun One Application server.
Audience
This document is indented to system administrators with UNIX skills to configure Apache webserver as a reverse proxy for Sun One Application Server.
4
4.1
Prerequisite
Apache Web server 1.3.27 or 2.2.x Sun One Application Server Version 7 C Compilers to compile Apache LibXML version 2
Locate the libpassthrough.so file on the server and add to load modules Edit the init.conf of your app server instance and add the following lines: # Entries for Reverse Proxy
Init fn="load-modules" shlib="/usr/appserver/lib/libpassthrough.so" funcs="initpassthrough,auth-passthrough,check-passthrough,service-passthrough" NativeThread="no" Init fn="init-passthrough"
<VirtualHost *:80> ServerName <hostname of the server where apache is hosted> DocumentRoot <Path where the static content is placed on the web server> ProxyPass /<APPNAME> http://<IP Address Of Appserver>:<Port>/<APPNAME> ProxyPassReverse /<APPNAME> http://<IP Address Of Appserver>:<Port>/<APPNAME> ProxyPreserveHost on </VirtualHost>
10
Ensure you copy the required static content to the web server Edit proxy_html.conf to load the proxy_html module # vi /usr/local/apache2/proxy_html.conf Uncomment the following entries: LoadFile /usr/lib/libxml2.so LoadModule proxy_html_module Save the file and start the web server To Start the apache2 web server # /usr/local/apache2/bin/apachectl start To Stop the apache2 web server # /usr/local/apache2/bin/apachectl stop To Re-start the apache2 web server # /usr/local/apache2/bin/apachectl restart Verify the access from a browser http://<IP Address of the web server/application path>/ modules/mod_proxy_html.so
11
Log Monitoring
Look for errors in the SUN One Server logs while restarting # tail f /var/opt/domains/domain_name/logs/server.log Look for apache 1.3 errors in the apache log file # tail f /usr/local/apache/logs/error.log Look for apache 2 errors in the apache log file # tail f /usr/local/apache2/logs/error.log
12