Tuesday, March 25, 2008

All about Apache web server configuration in Oracle Apps 11i

Oracle Web Server also called as OHS (Oracle Http Server) or Oracle-Apache is built on Apache Webserver. Oracle has added few custom component (like mod_plsql, mod_osso...) in Apache webserver & shipped it as Oracle Http Server.

Discussion in this page is currently w.r.t. Oracle Http Server Version 1.0.2.2.2 which is shipped with 11i (11.5.8-10). In coming weeks I'll add 10G Application Server Integration with Oracle Applications 11i.

Oracle Web Server or OHS is entry point in applications, It processes requests coming from network over Client. There is Web Listener listening for Web Requests. If request is for simple html page core Apace returns HTML page but if URL refernced need further processing it will be forwarded to respective module like mod_pls, mod_jserv ... I will start with basics like how to start stop webserver, important directories & files , troubleshooting , tuning & important things to know in oracle applications E-Business suite Webserver.

How to Start/Stop Web Server All startup shutdown scripts in Oracle Applications 11i(11.5.10) are in $OAD_TOP/admin/script/$CONTEXT_NAME where OAD_TOP is also called as COMMON_TOP and CONTEXT_NAME is your SID_hostname , lets say your SID or Instance Name is VISION and its on machine with name machine1 so your CONTEXT_NAME will be VISION_machine1. Script to start/stop Web Server is adapcctl.sh where ad (application dba), apc(apache), ctl(control) and sh stands for shell script. (You will find this script only on node on which you have webserver, if you have multi mode Installation and node 1 is only for Concurrent Manager, Reports & Database and node2 is webserver & forms then adapcctl.sh should be on node2 & not node1 ) adapcctl.sh calls apachectl (shell script in $IAS_ORACLE_HOME/Apache/Apache/bin) which in turn calls HTTPD (in same directory which is executable called http daemon) it starts using configuration file httpd.conf (from $IAS_ORACLE_HOME/Apache/Apache/conf directory , this file calls other configuration file. To know all important configuration file follow config files link)

File System for Web Server As you might already be aware of , if not there are three ORACLE_HOME in Apps

· Database ORACLE_HOME ( also called as 8i, 9i or 10g HOME depending on your database version)

· Forms & Reports ORACLE_HOME ( also called as 806 or 6i depneding on Forms Version)

· Internet Application Server ( iAS 1.0.2.2.2 or 1.0.2.2 depending on your Apps Version 11.5.5..11.5.10)

Web Server comes under third ORACLE_HOME & I will use it as IAS_ORACLE_HOME in my site in future. If you have Installed Oracle E-Business Suite Vision Instance you will see it under Middle Tier under . Lets assume you have installed apps under /u01/VIS11I then your iAS will be under directory /u01/VIS11I/ora/iAS & your IAS_ORACLE_HOME environment variable will point to /u01/VIS11I/ora/iAS. All files & directory related to Application Server will be under this directory.

For Apps DBA / oracle apps sysadmin following files/dir are important SID_Hostname.env, Apache, network .

· Env file is to set environment variable to iAS_ORACLE_HOME (During iAS patching )

· Apache is main directory where your most webserver configuration Sit also called as APACHE_TOP . Important directory under Apache are Apache, Jserv and plsql . Login to your server & check if these files/directories exists.

· Under iAS/Apache/Apache important directory/files are bin (executable, apachectl,httpd) ,conf ( httpd.conf, httpd_pls.conf, oracle_apache.conf ), logs (access_log, access_log_pls, error_log, error_log_pls, httpd.pid )

· Under iAS/Apache/Jserv files/directory you want to know are etc(config files), logs(jvm,mod_jserv.log)

· Under iAS/Apache/modplsql important bits are cache (cookie,plsql), cfg(wdbsvr.app , *.conf)

Its not feasible to explain features/importance of all files as and when I discuss a particular topic in further pages. I am sure you as oracle apps dba definately want to know How to troubleshoot Oracle apps web server, continue reading

Oracle Apps Web Server Troubleshooting

You as oracle application E-Business Suite sysadmin/dba should know how to troubelshoot & where to look in case of any issues with Webserver. In order to find any problems you should look at log file. All Oracle components have their own logs in respective directory. For Oracle Web Server (OHS/Apache) there are two places depending on type of issue , core apache/web server issues are recorded in

· Main Apache and its logs are at $IAS_ORACLE_HOME/Apache/Apache/logs

Where as anything related to Servlets, mod_jserv, JVM (Java Virtual Machine) should be in

· mod_jserv for servlets & jvm issues and its logs are at $IAS_ORACLE_HOME/Apache/Jserv/ logs & jvm where $IAS_ORACLE_HOME environment variable points to /u01/VIS11I/ora9/iAS (here you have installed Oracle Apps Vision Instance under /u01 )

usages I am explaining here. are files are relateive to $IAS_ORACLE_HOME

· When Apache starts , it starts with damon HTTP using httpd.conf (in Apache/Apache/conf) this is main configuration file which contain config parameters for Core Apache component(Few Important parameters are PidFile, Port, Listen, User, ServerAdmin, ServerName, DocumentRoot, ErrorLog, LogLevel, LogFormat, TransferLog, ErrorDocument , VirtualHost, SSLLog, SSLLogLevel, include, SSLCeritificateXXXX, RewriteEngine) To understand meaning of these parameters see below tail end of this article.

As an Oracle Apps DBA or sysadmin following configuration files are quite important in understanding and troubleshooting oarcle web server ot oracle applications 11i HTTP Server.

Important Configuration Files Contd... httpd.conf file calls jserv.conf (used for mod_jserv), oprocmgr.conf (oracle process manager), oracle_apache.conf (Oracle Custom Modules like mod_pls, mod_ossl, mod_osso..)

jserv.conf available at $IAS_ORACLE_HOME/Apache/Jserv/etc . This file calls few properties files ( jserv.properties, viewer4i.properties, forms.properties, xmlsvcs.properties )

oprocmgr.conf Used to configure and manage each remote apache Instances managed by local Apache Instance.

oracle_apache.conf This configuration file under $IAS_ORACLE_HOME/ Apache/Apache /conf is used to configure Oracle built modules supplied with default Apache ( for eg. mod_plsql, oem, imeeting). This file calls other configuration files ( plsql.conf, immeting.conf, apps.conf.

plsql.conf This file under $IAS_ORACLE_HOME / Apache/ modplsql/conf is used to configure pls (Plsql). This file defines to forward all requests like /pls/ to dedicated apache listener. There is another important file in this directory

Database Server for Applications. This file contain your dad (database Access Descriptor ) information like database connection description & apps user name & password . If you are changing apps password you use utility FNDCPASS and after changing password you have to manually change apps password in this file. Now you will say this is security risk to see password like this in a file . Yes it is but you can obfuscate this password .

Database Server for Applications. This file contain your dad (database Access Descriptor ) information like database connection description & apps user name & password . If you are changing apps password you use utility FNDCPASS and after changing password you have to manually change apps password in this file. Now you will say this is security risk to see password like this in a file . Yes it is but you can obfuscate this password .

Meaning of Parameters defined in httpd.conf

· PidFile The file in which the server should record its process identification number when it starts.

· Port The port to which the standalone server listens, If listen is also there then Port is used to build Self Referencial URL's

· Listen The port to which the standalone server listens.

· User/Group The name (or #number) of the user/group to run httpd as

· ServerAdmin E-Mail address, where problems with the server should be e-mailed.

· ServerName ServerName allows you to set a host name which is sent back to clients for your server if it's different than the one the program would get (i.e., use "www" instead of the host's real name. You will see load balancer name if load balancer is configured for Oracle E-Business Suite 11i.

· DocumentRoot The directory out of which you will serve your documents. When http://teachmeoracle.com is typed index.html is returned from Directory set in httpd.conf

· ErrorLog The location of the error log file.

· LogLevel Control the number of messages logged to the error_log. Possible values include: debug, info, notice, warn, error, crit, alert, emerg. (Helpful during troubleshooting)

· LogFormat Format of your access_log which records all users hitting your site. Useful in monitoring your webserver & hits like who referred to your site , what all users came & for how long they stayed on site.

· TransferLog To implement Feature like rotatelog ( Logs will be rotated based on timestamp or size)

· ErrorDocument Customizable error response in case oracle web server return http code 500 or 404

· VirtualHost Used if you want to set Virtual Host for your Oracle Application Web Server.

· SSLLog Used to record SSL logs ( If SSL Secured Socket Layer is configured with oracle applications web server)

· SSLLogLevel Log Level of SSL logs, helpful in troubleshooting SSL issues with Oracle Web Server.

· include Uesd to include other configuration files.

· SSLCeritificateX If SSL is enabled on apps 11i , used to define ssl parameters, like certificate file ..

· RewriteEngine To define Redirects for your Oracle Apps Web Server.

HAPPY LEARNING !!

1 comment:

  1. Dear Ajith

    The article was really helpful in learning abt Apps Administration concepts. Keep up the gud work. I like the way of ur explanation. The language was simple and very much explanatory.

    ReplyDelete

Thanks for you valuable comments !