One IP for Multiple Domains

Hi,
I have installed a DB and a Glassfish on one server. The server should handle 3 domains and only one IP address available which points to this server, each domain has its own Oracle APEX application.
www.d1.com >>> One IP Address >>> APEX Application1
www.d2.com >>> One IP Address >>> APEX Application2
www.d3.com >>> One IP Address >>> APEX Application3
How can I implement this?
Thanks,

Hi,
I actually had the same problem: I have one oracle instance (11gXE2) with Glassfish and the APEX Listener. I'm hosting different applications (in different workspaces) on this instance. The whole configuration is accessible by one fixed IP adres from the internet. I further have several domains (and sub-domains) mapped to this one IP. To ensure that a request for www.d1.com is routed to Application1 and www.d2.com to Application2 I wrote a smal plsql-"proxy (or multiplexer) using the OWA_UTIL.get_cgi_env ('HOST') variable to determine the requested domain and then redirect to an application that belongs to it.
The configuration I have stored in a table, for matching I use LIKE patterns:
Table for my "proxy":
{code}
CREATE TABLE "PROXY_RULES"
(     "ID" NUMBER,
     "SEQ" NUMBER,
     "HOST_PATTERN" VARCHAR2(1000),
     "REDIR_URL" VARCHAR2(1000),
     CONSTRAINT "PROXY_RULES_PK" PRIMARY KEY ("ID") ENABLE
{code}
filling for your example:
{code}
ID SEQ HOST_PATTERN REDIR_URL
1 5 %.d1.com http://www.d1.com/apex/f?p=App1:Home:0
3 10 %.d2.com http://www.d1.com/apex/f?p=App2
2 15 %.d3.com http://www.d1.com/apex/f?p=App3:1:0
0 99 % http://www.d1.com/apex/f?p=App1:Home:0
{code}
and the actual procedure to redirect calls:
{code}
PROCEDURE redirect IS
t_host varchar2 (250);
t_redir varchar2 (250);
BEGIN
t_host := OWA_UTIL.get_cgi_env ('host');
SELECT redir_url
INTO t_redir
FROM (SELECT redir_url
FROM proxy_rules
WHERE UPPER (t_host) LIKE UPPER (host_pattern)
ORDER BY seq, id)
WHERE ROWNUM < 2;
OWA_UTIL.redirect_url (curl => t_redir, bclose_header => TRUE);
EXCEPTION
WHEN OTHERS
THEN
OWA_UTIL.redirect_url (curl => 'http://www.d1.com', bclose_header => TRUE);
END redirect;
{code}
Grant execute on this procedure to the APEX_PUBLIC_USER, create a public synonym on it and make sure all requests without a path get redirected to it, for example with a simple index.html containing a redirect to "/apex/redirect":
<meta http-equiv="refresh" content="0; url=/apex/redirect">
This works fine, but doesn't check that App2 is accessed through www.d1.com. I still have to add this functionality.
I'm using the method on my sites [url http://www.rokit.nl]rokit.nl, [url http://www.fifapex.net]www.fifapex.net, [url http://m.fifapex.net]m.fifapex.net, [url http://www.themes4apex.com]www.themes4apex.com and [url http://www.themes4apex.com]www.themes4apex.nl. Try it!
I hope this helps.
Regards,
Christian Rokitta
Edited by: crokitta on Feb 28, 2012 1:38 PM
Edited by: crokitta on Feb 28, 2012 1:39 PM

Similar Messages

  • DNS for Multiple Domains

    I am trying to figure out the proper configuration for DNS that will support multiple domains. I have DSN working now for just one domain.
    My XServe has a static IP connected directly to cable modem and is the master nameserver. I also have an Ubuntu server with static IP connected directly to cable modem that is the secondary (slave) nameserver.
    On the XServe, I currently have a primary zone created for domain1.com. with:
    * an A record for domain.com. (Fully Qualified) and the same static IP as the XServe
    * an A record for ns1 (not fully qualified) and the same static IP as the XServe
    * Aliases for ftp, www and mail (not fully qualified) mapped to destination ns1.domain1.com. (Fully Qualified)
    Nameservers under the Primary Zone is ns1.domain1.com. and Mail Exchangers is ns1.domain1.com. with a priority of 10.
    The reverse zone is getting created appropriately for me as far as I can tell. I am able to access www.domain1.com just fine as well as mail and ftp.
    Now I want to add a new domain2.com to this master nameserver. I know that I will need a new Primary Zone for domain2.com. to be recognized and to setup it's aliases?
    Can I use the same static IP or do I have to have a unique static IP?
    Can I use the ns1.domain1.com. nameserver or does the new domain2.com need new nameservers?
    Does domain2.com have it's own A records?
    Does the mail exchangers need to be different for domain2.com?
    It seems like all the documentation and information that I can find are just for configuring one domain and not so much for multiple domains. Any help would be greatly appreciated.
    Spotted Dog

    Don't think of subsequent domains as being any different from the first domain.
    For every domain you need to provide certain information, including a list of the hostnames within that domain. There is no relationship between 'www' in domain1.com and 'www' in domain2.com (unless you point them to the same address, but that's a different issue).
    Any host record in the zone can either be an A record (where you specify an IP address) or a CNAME (where you specify another hostname that it maps to).
    In the case of your web server handling both domains you could set 'www.domain2.com' as an A record with the appropriate IP address, or you could set it as a CNAME with a value of 'www.domain1.com.' (essentially saying 'www.domain2.com has the same IP address of www.domain1.com, so go find that address').
    It's also possible to use cross-domain records for things like name servers and mail servers - in other words you can set your MX record for domain2.com to mail.domain1.com (essentially saying that domain2.com's email is handled by mail.domain1.com).
    Can I use the same static IP or do I have to have a unique static IP?
    That's not a question for DNS. What you're defining are the hostnames in that domain. If you have one server (e.g. a web server) that can handle multiple domains (e.g. one apache server handling web traffic for both domain1.com and domain2.com) then, sure, you can use the same IP address for both.
    If, on the other hand, you have specific services that cannot be multi-hosted (e.g. HTTPS) then you will need different IP addresses.
    Can I use the ns1.domain1.com. nameserver or does the new domain2.com need new nameservers?
    Sure, it's entirely possible to use domain1.com's name servers for domain2.com.
    Does domain2.com have it's own A records?
    It can do, or not, as you choose. If you're running www.domain2.com on the same server as www.domain1.com then you could use a CNAME record to point www.domain2.com to www.domain1.com.,or you could set an A record with the same IP address.
    The result would be the same, but the CNAME has the advantage that if your IP address changes you only need to change your DNS in one place (www.domain1.com) and all the other addresses would automatically follow.
    Does the mail exchangers need to be different for domain2.com?
    Not at all, if your mail server is configured to handle mail for both domains it's entirely possible to specify mail.domain1.com as the MX record for domain2.com.

  • Mailman v3 implementation of support for multiple domains

    Mailman has evolved to support listserve names for multiple domains (think VH for listserves). At what point can we see Apple roll this kind of management into the existing product? It would be fabulous to give VH clients the ability to have their own 'branded' listserve experience rather than one with our default domains
    Server Group -- please update Mailman when more pressing bug fixes are out of your way. Thank you!

    Alex,
    Thanks. I know that it can be done via the CLI, but once again we see where alterations done in the CLI will immediately require abandoning the SA as an admin tool. We're trying to encourage Apple to not create this paradox, or rather, to evolve the GUI admin toolset. I was recently at a Leopard Server tour seminar where the field engineer and I discussed this very feature. His comment to me was essentially 'many of the tools in the Server are based on open source projects, so you can simply download the latest update, compile it and configure it for the server ... but you won't be able to use the admin tools we provide." He's accurate, and if I was the only one admin'ing my machines, that might be a temporary solution to this particular small issue. But it immediately brings to mind the reflex question of 'so why did I buy Leopard server?
    This is a matter of Apple needing to provide sufficient resources to the Server group to grow the product. Whether that means some new hiring, or not pulling engineers off for other product lines, or a different management paradigm. We shouldn't purchase a server product that is touted as an enterprise-class solution when it may only have a bare framework for the offered toolsets. If growing the toolset to match what is already offered in the open source world (for that particular product) requires abandoning the server tools, then there's a bit of a vision problem with the Server product.
    Sorry, -- I didn't mean to get on a soap box. You and I are here to learn and help others. I know you aren't part of Apple any more than I am. I do hope Apple engineers are given some time to peruse this board and mine it for ideas, or gauge the effectiveness of their solutions based on the questions and solutions posed here.
    With Mailman 3 so far along in development (VH support was added in October), is Apple culling the very best from it for their user base (and adjusting the SA toolset accordingly)?

  • Can i install itunes multiple times on one computer for multiple users?

    Can i install itunes multiple times on one computer for multiple users?

    Like most applications you only need to install it once for it to be available to all users. (That said it is possible to install an application and only make it available to the current user, but that's rarely needed.)
    tt2

  • How to create one delivery for multiple sales order

    Hi!! Friends,
    Can some one explain the steps to be followed in creating one delivery for multiple sales order in SAP SD.
    Regards
    AKASH
    Message was edited by:
            AKASH TAMBI

    Hi.,
                  You can combine different orders in to one delivery ,But for the customer Order combination should be checked in  the sales area data of the shipping tab,we can combine orders but the ship to party,Route,Inco terms,Shipping date,shipping point should be same,you can do in T.code VL04 & VL10
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • How to create one TO for multiple TRs

    Dear All,
    how to create one TO for multiple TRs, kindly suggest me
    Regards,
    balu

    As for your question: it is discussed in sAP online help:
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/c6/f841f24afa11d182b90000e829fbfe/frameset.htm
    Sorry I misunderstood your question.
    The above mentioned solution won't create one single TO from multiple TR.
    Edited by: Csaba Szommer on Aug 11, 2010 9:46 AM

  • One TPV for multiple Countries

    Hi Experts,
    Could you pls share experirnce/knowledge around having one TPV for multiple countries together. The scenario is like below:
    1. There are mutiple Countries in Central America which are small islands for whom we need to roll out the Travel and Expense Solution.
    2. The Company code is only one which contains employees from all these Countries.
    Could you tell us how can we do the setup. Should we create one TPV at the company code level. OR should we rather use some other criteria for selecting the TPV maybe at the Personnel area or Personnel Sub Area level.
    Your help is much appreciated.
    Regards,
    Vijay

    Hi Kiron,
    These things I am aware about too. My real question is if I create only one TPV for the company code and assign the Country of the Company code then what issues would this cause. To name a few pls see below.
    1) The domestic Country would always be the Company code Country so would be treated as Domestic Country and show on the Form also as domestic Country even for the employees who are from other Countries.
    2) There are setting which SAP allows differently for Domestic and International like per diem, miles cumulations. So these necessarily have to be kept as same even though local laws are different in all these countries as Domestic is only the Company code Country.
    So I need detailed analysis of what impact I will have by having only one TPV as against making many TPV like one for each Country by using some other parameter like Personnel area/Personnel sub area etc.
    Appreciate your help!
    Regards,
    Vijay

  • One invoice for multiple deliveries

    Hi Gurus,
    Can any one tell how can i create one invoice for multiple deliveries.
    Regards,
    Vinod

    one invoice for multiple delivers we can do in vf04
    we can do in vf04
    reward points if it is help ful
    Thanks
    mubeen
    Edited by: mahammad mubeen on Mar 5, 2008 10:02 AM

  • One cheque for multiple vendors

    hi,
    is it possible to generate one cheque for multiple vendors ?
    cheque will be sent to bank and bank will deposit the amounts into vendor banks.
    Can you anybody help me?
    regards,
    kalyan

    Hi
    Yes. you can do it 
    First transfer the amount to bank and from there bank will transfer the amount to respective vendors through ther banks.
    Go for implementing automatic payment programme according to your client reqyuirement. Check  TCode F110 which is master transaction for APP.  Check at TCode F110-Environment-maintain Config.....
    Cheers
    Srinivas

  • One lockbox for multiple company codes

    Is it possible to have one lockbox for multiple company codes?

    No, I don't think so. Lockbox is 1:1 for a Company Code.
    You configure Lockbox for a Company Code.
    You can use one of the 2 available Lockbox user exits (not sure which) to write a piece of code that searches invoices against the customer posted to different company codes. You will have to have the intercompany setups.
    You may find an OSS notes for intercompany clearing.
    Hope this helps!

  • One delivery for multiple STO's

    Folks,
    I have multiple STO's for the same ship-to (plant). Items due for shipping would need to be combined into 1 delivery and not 1 delivery per STO.
    Would this be possible? And if yes, how?
    Thanks,
    MZ

    Hi ,
    Yes , We can create one delivery for multiple PO's .
    Go to VL10D tcode --> Purchase order tab -- > enter the STO's and press execute
    Select the STO's and click on background tab. Then it creates the log
    Select the item again and press shift +F4
    It will gives the log inforamation for the STO's and select the item and press on documents tab.
    It will creates only one Delivery for all the STO's.
    Now go to VL02N tcode and enter the delivery number then goto picking tab then enter picking qnty = delivery qnty
    then press on " post goods issue "
    Now go to MIGO to do the goods reciept then enter all the STO's here and check the item then save .
    Only one document will be posted for all the STO's
    Regards,
    Usha.

  • One OCS for multiple Company´s ???

    Hello,
    It´s possible to install multiple "areas" on one OCS? We want to provide a OCS for our customers. They shouldn´t see other caledars or adress-book. Only ther own "area".
    KR
    Mathias

    Hi ,
    Yes , We can create one delivery for multiple PO's .
    Go to VL10D tcode --> Purchase order tab -- > enter the STO's and press execute
    Select the STO's and click on background tab. Then it creates the log
    Select the item again and press shift +F4
    It will gives the log inforamation for the STO's and select the item and press on documents tab.
    It will creates only one Delivery for all the STO's.
    Now go to VL02N tcode and enter the delivery number then goto picking tab then enter picking qnty = delivery qnty
    then press on " post goods issue "
    Now go to MIGO to do the goods reciept then enter all the STO's here and check the item then save .
    Only one document will be posted for all the STO's
    Regards,
    Usha.

  • One inventory for multiple ORACLE_HOMEs ?

    RDBMS version:11.2, 10.2
    Platform : AIX
    In one server , we are going to install multiple ORACLE_HOMEs (both 10.2 and 11.2). I have been asked to configure separate inventory for each ORACLE_HOME (each inventory within its own ORACLE_HOME). But i came across OTN posts which advices one inventory for all ORACLE_HOMEs .
    1. How can i create 1 inventory for all ORACLE_HOMEs . Is it by specifying an inventory directory outside all ORACLE_HOMEs in OUI when you do the very first installation ?
    2. Which one is more professional : one inventory for each ORACLE_HOME or one inventory for all ORACLE_HOMEs ?

    When installing Oracle software for the first time, the OUI will create a "global" inventory under $ORACLE_BASE.
    Depending on you OS, to locate this inventory look at "/etc/oraInst.loc" (AIX+Others) or "/var/opt/oracle/oraInst.loc" (Linux+others).
    You can add/remove Oracle homes from this inventory by using OUI or command line ./runInstaller.
    Each Oracle home may also contain an "$ORACLE_HOME/oraInst.loc" file.
    HTH
    PS: +"One inventory for multiple ORACLE_HOME is a bad practice"+ -- Untrue. Perhaps only for those that don't know how to use it.
    :p

  • Shall I use one datasource for multiple connection pool?

    Hi,
    I need to clarrify that, Shall I use one Datasource for multiple connection pool in distributed transaction?
    Thanks with regards
    Suresh

    No. If its transactions across multiple databases you should use different datasources.

  • How to schedule one report for multiple company code?

    How you can schedule reports in BW 3.5? Suppose I need to schedule one report for multiple company code, how can you do that and notify the users? I do not want to send multiple emails to the same user if the report runs for 20 times (for 20 different companies).
    points are given for ASAP replies.
    Thanks in advance
    Peter

    Dear Peter,
    Try to restrict the Company Code with  those 20 values and schedule.
    Regards,
    Ramkumar.

Maybe you are looking for

  • Premiere, After Effects, Speedgrade, Media Encoder and... the dynamic link

    My feeback after working with the dynamic link these days. Basic project. Editing, color correction, animated titles. I'm using a 3.5Ghz iMac 24GB Ram and a GTX 780 4GB. (2014 versions & last updates). Rendering the timeline in Premiere is sometimes

  • Making a Many to Many CMR in Netbeans

    Anyone have any clue how to do this? I have the classic three tables: create table user ( id integer, name varchar(30) create table role ( id integer, name varchar(30) create table userrole ( userid integer, roleid integer I use NB 5 to create the Us

  • Is my ipod  fixable or not (freezes and deletes songs)

    i looked up my warranty says its still under it till november but says i need my sales receipt one problem my parents bought it for me as a gift and they got rid of the bloody thing smart people?? the ipod locks and freezes i did everything tried to

  • Application folder in Dock

    First, I apologise if this has been asked before - there just were too many pages to search! I accidentally deleted Applications from my Dock. How do I put it back?

  • I can't find photo booth

    I tried using spotlight and finder but it seems to have disappeared.