jQuery in Action, 3rd edition
The moose likes Tomcat and the fly likes Configuring Apache Webserver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuring Apache Webserver" Watch "Configuring Apache Webserver" New topic

Configuring Apache Webserver

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Hi Ranchers,

I am trying to configure Apache Webserver 2.2.6 on Windows XP machine.
I have a situation where my application lets my users to upload images into non-webroot folder (that is folder other than my apache webroot). So lets say my Apache Webroot is E:\Softwares\Apache2.2.6\htdocs and my upload directory is E:\uploads. For every user, my application (on the runtime) creates a folder (folder name will be same as that of user's profile id) inside E:\uploads\<new_folder>.

So lets say a user's profile id is : tom, then his images will be uploaded to the following directory


Question : How do I access these images using the http protocol?

I have done following R&D :

In the apache's httpd.conf file, I have done the following settings :

<Directory "E:/uploads">
AllowOverride All
Options Indexes
Order Allow,Deny
Allow from all

and under <IfModule alias_module> tag :

ScriptAlias /profile_images/ "E:/uploads/"

Restarted my apache, and I am tried to access the image as follows from the web browser :


I am getting 403 Forbidden error :
You don't have permission to access /profile_images/tom/image1.jpg on this server.

Appreciate if anyone can please shed some lights onto this.

Thanks a lot in advance.
Naseem Khan

Asking Smart Questions FAQ - How To Put Your Code In Code Tags
I agree. Here's the link: http://aspose.com/file-tools
subject: Configuring Apache Webserver
It's not a secret anymore!