Create alias / Virtual directory in oracle 12c OHS – Open server files using web_show_document in Oracle 12 c -



In this section we will be creating a alias for a folder in our oracle forms 12 c server so that we can access the files in that folder from client browsers.

From oracle forms 11g , we need to add the folder path in httpd.conf file too. As always let me show it via screenshots.


The process is as follows.


  1. Login to EM and go to ohs section
  2. Add alias in ohs
  3. Open httpd.conf
  4. Add folder permissions
  5. Restart Ohs


Things to remember


  • In httpd.conf , we need to use ‘/’ instead of ‘\’ in the folder path. and the path should be in double quotes. eg ; “C:/docs/images”


In my case, I am going to create alias for a folder C:\docs\images. let’s do it.



Login to oracle forms 12 C EM and click on the Target navigation pan on top left



Expand HTTP server and right click on ohs1 then go to Administration –> Server configuration


select server configuration


The page will not be editable now, so we need to lock the page before editing. For this , click on the “lock icon” at top right and click on the “Lock & Edit” option.


Lock & Edit


Now go to the bottom of the screen and click on “Add Row” and enter our folder and alias.



Now Apply this change by clicking on the “Apply” button top right.


Apply


Next step we need to add the folder in httpd.conf file.


To do this, click on the oracle HTTP Server menu and navigate to Administration –> Advanced Configuration.



In the screen, select httpd.conf and click “Go” button.



This will open the file ad at the bottom of the file, you can see that the alias already added.



After that line, add your folder path and permission as below.


Make sure that you need to provide ‘/’ instead of ‘\’ in the folder path and the complete path should be in double quotes.




<Directory "C:/docs/images"> Options Indexes MultiViews AllowOverride None Require all granted </Directory>


There is a blank line at the end of the file, leave it like that. In some files, there needs to be a blank line at the end of the file. I didn’t test this file but it is always good to continue with the format the original file is having. In this case, there were a blank line at the end, I just press “enter” at the Alias line and pasted our permissions code and saved.


Now save this modification. As we did earlier, click Apply at the top right.



Now since all the operations are complete, we need to activate the changes. 

For this , click on the right top lock button and select Activate changes option.



Now restart ohs.



To identify the port on which the alias can be accessed by client browser, Click on Orcale HTTP Server menu and then select Home. This will take you to ohs home and the ip will be shown there.




In my case, 7777 is the port.



I have added a sample gif file in the physical folder. let me try opening it from my client browser.


so my web address will be my server ip : port no / alias / file name. eg


http://192.168.0.123:7777/images/SampleImage.gif



File is opening in client browser. So that is done. 


If you have any doubts/ queries, let me know that in the comments.


Next Post Previous Post
No Comment
Add Comment
comment url