Oracle (Apache) HTTP Server FAQ
$Date: 19-Jan-2003 $
$Revision: 1.02 $
$Author: Frank Naudé $
Topics
Back to Oracle FAQ Index
What is the Oracle HTTP Server and how does it work?
The Oracle HTTP server is a simple Web HTTPD server (Web listener). It is based
on the Apache Web Server provided by the Apache Group (www.apache.org).
Both the Oracle Database Server (8.1.7 and above) and Oracle 9iAS
(Oracle Internet Application Server) ships with the Oracle HTTP Server.
The following virtual servers are predefined when one install the
Oracle HTTP Server:
- HTTP Server Home Page
http://machine-name:7777/
(Apache documentation, mod_plsql, mod_ose, mod_JServ, JSP, etc.)
- Oracle Enterprise Manager (OEM) Web_stage
http://machine-name:3339/
(Oracle Enterprise Manager Console and applications)
Please note that these ports might be different on your system. Check the httpd.conf file
to obtain the correct port numbers.
Back to top of file
How does one start and stop the Oracle HTTP Server?
Look at this example:
On Unix:
cd $ORACLE_HOME/Apache/Apache/bin/
./apachectl start # or... httpdsctl start
# or... httpdsctl startssl
On Windows NT/2000
Start the Apache service
NOTE: It is better to use the apachectl command than the
httpdsctl command as apachectl also sets a number of
required environment variables.
Back to top of file
How does one publish static HTML pages on the Oracle HTTP Server?
One can use the Oracle HTTP Server to publish standard HTML pages. Start by
defining a alias (virtual directory on web) to point to the physical directory
containing the HTML pages you need to publish.
- cd $ORACLE_HOME/Apache/Apache/conf
- Edit httpd.conf and add the following lines:
Alias /mydocs/ "/my/directory/name/"
<Directory "/my/directory/name">
Allow from all
</Directory>
- Restart the Oracle HTTP Server
- Open your Web browser and navigate to http://my.host.name:7777/mydocs/index.html
Notes: More options can be added to the "httpd.conf" file as per the Apache Server
Documentation.
Back to top of file
How does one execute standard CGI-BIN programs from the Oracle HTTP Server?
One can execute any program that conforms to the CGI (Common Gateway Interface) standard from
the Oracle HTTP Server. Such a program can be written in Perl, TCL, C++, COBOL or any other
programming language.
Add the following line into your httpd.conf file and restart the server:
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
Note the slash (/) at the end of the path.
Back to top of file
How does one password protect certain directories?
Add the following directives to the <Directory ...> entry (see example above)
in your httpd.conf file and restart the Apache server. You can also add these directives
to the $ORACLE_HOME/Apache/modplsql/cfg/plsql.conf file to protect ALL database access:
AuthName "Web User Authentication"
AuthType Basic
AuthUserFile /path/to/your/password/file
Require valid-user
Use the htpasswd utility to create the password file. Look at this example:
htpassswd -c /path/to/your/password/file username1 # Create initial passowrd file
htpassswd /path/to/your/password/file username2 # Add second user to the passowrd file
Note that you can add more users without having to restart the Apache server. Some handy
Perl CGI-BIN scripts are available to handle user registration from a web page.
Back to top of file
How does one configure the Oracle HTTP Server?
The Oracle HTTP Server is configured by editing the httpd.conf file in your
$ORACLE_HOME/Apache/Apache/conf directory by hand. Oracle does not provide any
GUI utilities to edit this file. Consult the standard Apache documentation
before making any changes to this file. See
gui.apache.org if you need some GUI
management utilities to do the job.
Back to top of file
Can one start the Apache listener on port 80?
Ports below 1024 (on Unix and Linux systems) are "privileged" ports; only accounts with
superuser permissions (like root) can start programs that uses them. If you need to run the
Apache Server on the default port (port 80), contact your system administrator to
start and stop the server for you.
Back to top of file
Hoe does Oracle extend the Apache Web Server?
The Apache Web server can be extended by writing modules or Apache mods. Oracle
provides mods for the following:
- Oracle PL/SQL ToolKit (mod_plsql) - Execute PL/SQL on DB and return HTML to browsers.
See the MOD_PLSQL FAQ for details.
- Oracle Servlet Engine (mode_ose) - Call Servlets stored in an Oracle DB
- Etc.
Some of the standard Apache mods that can be used:
- mod_auth - Basic Web authentication
- mod_perl - Run perl scripts faster using the Apache in-process Perl interpreter
- mod_ssl - Secure Socket Layer (SSL)
- mod_cgi - Run scripts and programs via the Common Gateway Interface
- Etc.
Back to top of file
Where can one get more info about the Oracle HTTP Server?
Back to top of file