Hosting multiple web site on Oracle Application Server 10g is easy.
By default, AS10g supports one site that can host multiple application.
However, AS10g (and 9iAS for that matter) can host multiple sites, with
different names and/or different IP addresses. When Oracle HTTP
Server (OHS) or Apache host multiple site they are called Virtual Host.
Virtual Host are different web sites
hosted by the same OHS server. They are configured in the
OHS/Apache configuration file httpd.conf or preferably in the
Application Server Control. First lets look at the conf file
ServerAlias website1.com *.website1.com
ServerAlias website2.com *.website2.com
In the section of the httpd.conf file shown above I defined the
minimum requirements for virtual host as separate websites.
Tells OHS to listen for named virtual host on port 80 (the standard web
listening port). In the heading of each virtual host I define the
port for that virtual host (also 80).
Then I defined the document root for that web site. This is where
the OHS process executing that request will go to find the documents to
Finally, I define the name for that website as the ServerName and the
accaptable aliases as the ServerAlias.
Since the HTTP header sent to OHS contains the name of the site, OHS
will use that information to server the appropriate website page.
Of course the final step is outside the OHS. If each site has
their own IP address, you simple forward the request to the same server,
or set up both websites with the same IP address in your DNS.
You can also setup an IP based Virtual Host to create a site with its
own IP and port.
When you create Virtual Host, the main host goes away. The
first Virtual Host must be the default host. In other words, all
host must be named. If no site name is sent with the request
header, OHS will serve the first Virtual Host.
Use Application Server Control to Setup Your Virtual
If you use an infrastructure/Metadata Repository, you need to use the
Application Server Control to configure your Virtual Host.
Logon to AS Control and open the HTTP Server component. Select
Virtual Host and select the Create Button. Application
Server Control will now walk you through seven steps to configure you
virtual host. This includes defining separate access and error
Next Week we will discuss connecting your application to a Virtual Host.
App Server Support?
I'm now offering personal app server mentoring for Oracle DBAs who
must quickly learn the intricate details of Oracle9iAS. You can
have an Oracle expert right at your fingertips, anytime day or night.
We work with dozens of App Server Oracle databases every year, so we
know exactly how to quickly assist you with any Oracle9iAS or Oracle
Application Server 10g question.
Call 800-766-1884 for a custom evaluation.
Are You Grid Enabled?
Oracle 10g Grid technology is has changed Oracle
forever and all Oracle professionals must understand this core
Mike Ault, a world leader in Oracle Grid Technology now has the
premier book on Oracle 10g Grid internals:
Don't be left
behind. Learn Oracle10g Grid from the experts.
Burleson Oracle Consulting
Kittrell, NC, USA, 27544