Configure dads.conf file to connect to two data bases
This tutorial will explain how to configure dads.conf file to get something similar to the image in the left, you already have a server with Apache that is configured to connect to a database with Apex (i.e. Apex 3.2) and now you want to use the same server to connect to other version of apex in other data base server (i.e. Apex 4.2) but you don't want to lost the current connection. In that case you only have to modify the dads.conf file and change something in the new Apex installation.
The different step you have to make is when you run the apexins.sql script, there you include the parameter /i/ to indicate a virtual directory for the images, but probably the old apex installation is using the same directory, and this new apex version will use different images, that's why you have to name the virtual directory with a different name running the script with a command like this one
Now the virtual directory for the images of this new apex installation will be /i2/.
at the end your dads.conf file will be similar to this one, the first Location block allows the connection to the first Apex, and the second one is for the new Apex.
You have to change everything inside [] in the lines 01, 05, 10, 17, 22, 29 and 36 with your data, after that, Restar the Apache server.
Suppose we make the next assignations
[PATH_OF_IMAGES_FOR_APEX_4.2] = /apex3.2/images
[OLD_APEX_URL] = /pls/apex
[PATH_OF_IMAGES_FOR_APEX_4.2] = /apex4.2/images
[NEW_APEX_URL] = /pls/newapex
And we used myserver:8080/pls/apex to connect to apex 3.2, then we'll connect to apex 4.2 using myserver:8080/pls/newapex and it will look for the images from the folder /apex4.2/images
If both Apex have the same version, they will use the same images and that's why they can use the same virtual Directory.
If you are able to connect to both Apex version, then celebrate like Kashiyuka:D and enjoy the below song from Perfume meanwhile you make your work.
Installing Apex
Since this post is not about how to install apex, I'll not explain all the steps to install Apex, only the step you have to make something different, you can refer to Oracle documentation or other blogs to install it. If both apex installation have the same version, you'll not need to change this this step.The different step you have to make is when you run the apexins.sql script, there you include the parameter /i/ to indicate a virtual directory for the images, but probably the old apex installation is using the same directory, and this new apex version will use different images, that's why you have to name the virtual directory with a different name running the script with a command like this one
@apexins.sql SYSAUX SYSAUX TEMP /i2/
Now the virtual directory for the images of this new apex installation will be /i2/.
Configure dads.conf
your dads.conf file is configured to connect the server with the current apex installation, and that connection is indicated in the data block Location, to allow a connection to the new apex installation, you'll have to copy this block and set the parameters for the new connection, next to Location, change that path for the url you want to use for the new apex connection, for example /pls/newapex, and also create a new alias with the path of the images for the new apexAlias /i/ "ORACLE_HTTPSERVER_HOME/Apache/images2/"
at the end your dads.conf file will be similar to this one, the first Location block allows the connection to the first Apex, and the second one is for the new Apex.
Alias /i/ "[PATH_OF_IMAGES_FOR_APEX_3.2]" AddType text/xml xbl AddType text/x-component htc <location [OLD_APEX_URL]> Order deny,allow PlsqlDocumentPath docs AllowOverride None PlsqlDocumentProcedure wwv_flow_file_mgr.process_download PlsqlDatabaseConnectString [DataBaseServer]:[Port]:[service Name] PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8 PlsqlAuthenticationMode Basic SetHandler pls_handler PlsqlDocumentTablename wwv_flow_file_objects$ PlsqlDatabaseUsername APEX_PUBLIC_USER PlsqlDefaultPage apex PlsqlDatabasePassword [APEX_PUBLIC_USER_PASSWORD] #PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize Allow from all </location> Alias /i2/ "[PATH_OF_IMAGES_FOR_APEX_4.2]" <location [NEW_APEX_URL]> Order deny,allow PlsqlDocumentPath docs AllowOverride None PlsqlDocumentProcedure wwv_flow_file_mgr.process_download PlsqlDatabaseConnectString [DataBaseServer]:[Port]:[service Name] PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8 PlsqlAuthenticationMode Basic SetHandler pls_handler PlsqlDocumentTablename wwv_flow_file_objects$ PlsqlDatabaseUsername APEX_PUBLIC_USER PlsqlDefaultPage apex PlsqlDatabasePassword [APEX_PUBLIC_USER_PASSWORD] #PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize Allow from all </location>
You have to change everything inside [] in the lines 01, 05, 10, 17, 22, 29 and 36 with your data, after that, Restar the Apache server.
Suppose we make the next assignations
[PATH_OF_IMAGES_FOR_APEX_4.2] = /apex3.2/images
[OLD_APEX_URL] = /pls/apex
[PATH_OF_IMAGES_FOR_APEX_4.2] = /apex4.2/images
[NEW_APEX_URL] = /pls/newapex
And we used myserver:8080/pls/apex to connect to apex 3.2, then we'll connect to apex 4.2 using myserver:8080/pls/newapex and it will look for the images from the folder /apex4.2/images
If both Apex have the same version, they will use the same images and that's why they can use the same virtual Directory.
If you are able to connect to both Apex version, then celebrate like Kashiyuka
Comments
Post a Comment