Oracle Training Oracle Support
Oracle Training
SQL Tuning Consulting
Oracle Tuning Consulting
Data Warehouse Consulting
Oracle Project Management
Oracle Security Assessment
Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Internals Magazine
Oracle Links
Oracle Monitoring
Remote Support Benefits
Remote Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices
 

Free Oracle Tips


 
HTML Text AOL
 
 

Hosting Multiple Web Sites

Sept 22,  2004
John Garmany

 

     

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 directly.

NameVirtualHost *:80
#
<VirtualHost *:80>
DocumentRoot /var/www/website1
ServerName www.website1.com
ServerAlias website1.com *.website1.com
</VirtualHost>
#
<VirtualHost *:80>
DocumentRoot /var/www/website2
ServerName www.website2.com
ServerAlias website2.com *.website2.com
</VirtualHost>

In the section of the httpd.conf file shown above I defined the minimum requirements for virtual host as separate websites. 

NameVirtualHost *:80

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).

<VirtualHost *: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 server.

DocumentRoot /var/www/website1

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.

Important Point!!!!!

 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 Host.

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 logs etc

Next Week we will discuss connecting your application to a Virtual Host.

 


  If you are a DBA that inherited the administration of AS10g, this is the book for you.  Written by a DBA for DBAs

Oracle Application Server 10g Administration Handbook

by Oracle Press. In Book Stores Now!


Need Oracle 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 Oracle technology.

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.
 


 

Regards,

John Garmany


Burleson Oracle Consulting

Kittrell, NC, USA, 27544
www.dba-oracle.com
www.remote-dba.net 

 

 
 

 

 

Burleson Consulting
Kittrell, NC

Email: info@remote-dba.net • Phone (800)
766-1884

Copyright © 1996 - 2015 by Burleson , Inc. All rights reserved.