logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: prevent access to files
Author
Obould



Joined: 06 Mar 2014
Posts: 1
Location: Belgium

PostPosted: Thu 06 Mar '14 11:33    Post subject: prevent access to files Reply with quote

Hello,

when a user enters the whole url to a file on the webserver he/she can view this file. I want to prevent this and only allow access to the files from within the application (under apache). How can I do that? I already tried:
Quote:
<Directory /var/www/html/folder/files>
order deny,allow
allow from localhost
</Directory>

This works BUT the file also isn't viewable from within the application anymore.

Does anyone know how I can achieve this? I already googled but didn't find a solution.

Best regards,
Obould
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Thu 06 Mar '14 14:58    Post subject: Reply with quote

Your application can get the file contents internally via the file system/FTP/Shared folder/whatever.
If you want to stick with access via HTTP, you can password-protect the directory so your application can access the file using some credentials.
Maybe there's more ways.
Back to top


Reply to topic   Topic: prevent access to files View previous topic :: View next topic
Post new topic   Forum Index -> Apache