Forum Stats

  • 3,728,079 Users
  • 2,245,538 Discussions


How to configure Virtual Hosts in Oracle XE - Multiple Domain Names

439244 Member Posts: 61
I have installed OracleXE in RHEL 4.0 and FC6 Fedora Core 6 successfully.

My URL could be any of these options:

[ Where is the private IP of my box ]
They all work fine.!!!

I wonder how to configure the equivalent of Virtual Hosts in Oracle XE

I like to keep my same IP:

Add 2 Domains: => Development Domain => Production Domain

The Domains resolve properly to the same IP [ ]

I like to receive the http request redirect to the properly URL or APEX page in OracleXE.

I guess for Apache would be some kind of virtual hosts configuration, however I can't find the location to create this Virtual Servers and put the properly redirection.

Best Regards Dino
Brains R Like Books only work when they R Open.


  • 138365
    138365 Member Posts: 510
    edited November 2006
    One possibility would be to configure a standalone Apache as a proxy server to XE.

    Maybe info's in this thread can help you.

    Also you can use search to find more usefull threads ...

  • 439244
    439244 Member Posts: 61
    Ok. after digg into many website finally found the answer. Yes is with and External Installation of Apache using: mod_proxy and mod_rewrite.

    Here is what it did.

    I have my own Shell script that install my LAMP Using apache 1.3.37. I modify my script like this:
    # Install APACHE
    cd apache_1.3.37
    SSL_BASE=/usr/local/openssl \
    ./configure \
    --prefix=/usr/local/apache \
    --enable-module=ssl \
    --activate-module=src/modules/php4/libphp4.a \
    --enable-module=php4 \
    --enable-module=auth_dbm \
    --enable-module=auth_db \
    --enable-module=rewrite --enable-shared=rewrite \
    enable-module=proxy enable-shared=proxy

    The last 2 lines include the mod_proxy and the mod_rewrite, don't need to add any extra libraries... After some minutes apache will compile with the properly modules. Once finished we need to do some editing in the box for the httpd.conf

    Include the files in your httpd.conf in the line 205:
    LoadModule proxy_module /usr/local/apache/libexec/
    LoadModule rewrite_module /usr/local/apache/libexec/

    Make sure the and were created when U compile Apache.

    Ok now let's go to the Virtual Server configuration:
    I want 2 domains for this exercise: => Development Domain => Production Domain

    Make sure they are in your hosts file or resolve for your DNS.

    This is the sample to configure the first Domain

    <VirtualHost *:80>
    ServerAdmin [email protected]

    RewriteEngine on
    RewriteRule ^/$ [R]
    RewriteRule ^/apex/$ http://keops:8080/apex/f?p=100:1 [P]
    RewriteRule ^/apex/(.*)$ http://keops:8080/apex/$1 [P]

    ProxyPass / http://keops:8080/
    ProxyPassReverse / http://keops:8080/

    <Location />
    Order allow,deny
    Allow from all

    [*** Note keops is the hostname of my server ]

    Fairly Easy don't you think !!!. I really have a lot of hard time thinking alternatives... should I like to change the port.. yes IP tables can do the trick but I like something else....

    Now I'm running my regular installation of Apache in /usr/local/apache compiled just like I like it from source with PHP Support and probably Oracle. also this server le me configure as many webservers as I want and assign each domain one Application Workspace in OracleXE.

    Pretty cool now I just open the browser at and takes me directly to: => Which really is: http://keops:8080/apex/f?p=100:1

    Awesome. I'm happy with the result. Note kind of funny the options for the RewriteRule => [R] and [P]. that is what really did the trick.

    I guess at this time the next thing is to secure with more Redirect Rules in the Virtual directory to make sure nobody try to access different workspace from another domain just trying to change the URL for the WorkspaceID. but that is a different issue perhaps for the Apache mod_rewrite forum ;-)

    Best Regards Dino.
    Brains R Like Books only work when they R Open [ Yes Running OracleXE in a Virtual Domain of Apache ]
This discussion has been closed.