Charles Menezes
RSS icon Email icon Home icon
  • Oracle Application server to support multiple name domains on the same IP using APACHE server.

    Posted on January 14th, 2010 charles No comments

    Changes to be made on the Oracle Application server to support multiple name domains on the same IP using APACHE server.

     1) Backup httpd.conf from the apache/conf folder.

     2) Listen: Allows you to bind Apache to specific IP addresses and/or ports, in addition to the default. Search and add to file : Listen 80

    3) Comment out ServerName [charles1] using # as we will be shifting to virtual hosts configuration and there would not exist one server using this parameter ServerName

    The ServerName directive sets the hostname and port that the server uses to identify itself. This is used when creating redirection URLs. For example, if the name of the machine hosting the web server is simple.example.com, but the machine also has the DNS alias www.example.com and you wish the web server to be so identified.

    4) Add new parameter to file NameVirtualHost 192.168.63.100:80 from #NameVirtualHost *

    With the NameVirtualHost directive you specify the IP address on which the server will receive requests for the name-based virtual hosts. This will usually be the address to which your name-based virtual host names resolve. In cases where a firewall or other proxy receives the requests and forwards them on a different IP address to the server, you must specify the IP address of the physical interface on the machine which will be servicing the requests. If you have multiple name-based hosts on multiple addresses, repeat the directive for each address.

    5) Move all files from D:\product\10.1.3.1\OracleAS_2\Apache\Apache\htdocs to folder domain1 as D:\product\10.1.3.1\OracleAS_2\Apache\Apache\htdocs\domain1

    6) Create folders domain2 , domain3 , at the same level as domain 1 i.e D:\product\10.1.3.1\OracleAS_2\Apache\Apache\htdocs

    7) Update network DNS/host files with the new domain address and IP, so as to point the domain name to the correct server IP address, the domain names will be resolved up the application server (APACHE) level to point to different website roots. Use ping to check domain name/IP binding on network.

    8 ) Add virtual hosts (uncomment first)

    # domain 1

    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot “D:\product\10.1.3.1\OracleAS_2\Apache\Apache\htdocs\domain1″
    ServerName www.charles1.com
    ErrorLog logs/charles1.com-error_log
    CustomLog logs/charles1.com-access_log common

    # domain 2

    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot “D:\product\10.1.3.1\OracleAS_2\Apache\Apache\htdocs\domain2″
    ServerName www.charles2.com
    ErrorLog logs/charles2.com-error_log
    CustomLog logs/charles2.com-access_log common

    # domain 3

    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot “D:\product\10.1.3.1\OracleAS_2\Apache\Apache\htdocs\domain3″
    ServerName www.charles3.com
    ErrorLog logs/charles3.com-error_log
    CustomLog logs/charles3.com-access_log common

    ** Set different path folder for logging, will help in maintenance of each site hosted individually.

    9)Test new configuration of the httpd.conf by using command line argument C:/> apache –t.

    10)Restart Application server using opmnctl stopall followed by opmnctl startall

    11)Check for all domains in IE

    Share and Enjoy:
    • Print
    • Digg
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google Bookmarks
    • email
    • LinkedIn
    • Live
    • MSN Reporter
    • MySpace
    • PDF
    • Reddit
    • RSS
    • Twitter
    • Yahoo! Bookmarks
    • Yahoo! Buzz

    Leave a reply

Switch to our mobile site