Oracle and more - Amardeep Sidhu

My experiences with technology…

Accessing outside DocumentRoot files in Apache HTTP server

Posted by Sidhu on July 22nd, 2008

I don’t know a bit about Apache HTTP server but faced one issue in office…so thought about writing it here ;)

We are having a 3 tier setup where Oracle Application Server 10g was there on AIX 5.3. It runs Apache HTTP server and we needed to access the files outside DocumentRoot. A bit of googling revealed that we could use Alias for that. Basically we need to add the following small piece of text to httpd.conf file:


Alias /test1/ "/home/sidhu/test1/"
<Directory "/home/sidhu/test1">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Now we should be able to access the files in /home/sidhu/test1 by hitting the following URL

http://server:port/test1/filename.html

PS: I couldn’t find the reason but it didn’t allow me to use word “reports” in the directory name.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>