• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Configuring Apache Webserver

 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

E:\uploads\tom\image1.jpg
E:\uploads\tom\image2.jpg
E:\uploads\tom\image3.jpg
E:\uploads\tom\image4.jpg
E:\uploads\tom\image5.jpg
E:\uploads\tom\image6.jpg

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
</Directory>


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 :

http://localhost/profile_images/tom/image1.jpg

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
reply
    Bookmark Topic Watch Topic
  • New Topic