How to allow only certain files in Apache?

Let’s learn how to allow only certain files in Apache. The most accurate or helpful solution is served by Server Fault.

There are ten answers to this question.

Best solution

How to allow only certain files in Apache

I'd like to filter access to certain files in apache. I want only CGI access. So I tried putting in vhost file: <FilesMatch "\.cgi$"> Order allow,deny Allow from all </FilesMatch> <FilesMatch "."> # All other files Order allow,deny Deny from all </FilesMatch> But the latter overrides it all. Thanks

Answer:

I believe you need to swap the values in your Order directive as follows: <FilesMatch "\.cgi...

Read more

Himberjack at Server Fault Mark as irrelevant Undo

Other solutions

Apache returns 404 for an existing file

Apache web server is insisting that the page we are trying to access is missing, but we know it isn't so. We have an installation of Oracle Application Server (actually, more than one, but different servers). This product uses the Apache web server to...

Answer:

URLs are case-sensitive. Are you using an upper case character instead of a lower case one, or vice...

Read more

splice at Ask.Metafilter.Com Mark as irrelevant Undo

Apache 1.3, default-deny policy, allow null basenames

I want to allow access to only certain file extensions (let's say just .phtml and .jpg) in a specific directory. I want to specify these in a default-to-deny way. In other words, I want to deny everything and then explicitly list the extensions to allow...

Answer:

Okay, at first I was stumped, but I seem to have a working solution. I have added the following to...

Read more

tcordes-ga at Google Answers Mark as irrelevant Undo

Problem with Apache (Win2K) on a local network

Problem with Apache (Win2K) on a local network . . . I have an install of Apache that runs fine on my Windows 2000 machine. I've added an XP laptop and I want to keep the 2000 machine as my server but work from the XP machine. Trying to browse to the...

Answer:

I usually [for some reason] also have a problem with Apache using virtual domains on a win2k based environment...

Read more

yerfatma at Ask.Metafilter.Com Mark as irrelevant Undo

Serving images from another hostname  or Apache overload for the rewrites?

We are trying to improve further the speed of some sites with older HTML in order as well to obtain better SEO results. We have now applied some minify measures, combined html, css etc. We use a small virtualized infrastructure and we've always wanted...

Answer:

Have you considered using Nginx as reverse proxy to serve static content? You can do this without the...

Read more

Raghavendra Kidiyoor at Quora Mark as irrelevant Undo

How to prevent non-authorized access to PDF files with PHP Session Management

Let's say I have a website www.mysite.com with the intranet at www.mysite.com/mynet. I use PHP Session Management and MySQL database to authenticate users whenever they go to www.mysite.com/mynet URL. Currently, this directory has only .php files. Now...

Answer:

Hi, oraman2003. Thanks for your question. The easiest way to do this is to create a PHP script that...

Read more

oraman2003-ga at Google Answers Mark as irrelevant Undo

uploading/downloading huge files

How to code a Perl web app to upload/download HUGE files? A straight HTTP upload/download for my app is untenable because I'm dealing with files of hundreds of megs each. I'd like to see a solution that would offer progress bars, and (more importantly...

Answer:

FTP comes to mind... There is an enormous variety of software for FTP and most web browsers can do FTP...

Read more

Zed_Lopez at Ask.Metafilter.Com Mark as irrelevant Undo

What does Apache actually do?

I'm running a web server on linux, ubuntu and have apache2 installed. I'm not actually sure what this does? allthough I know my server does not host websites unless I have apache installed. does it jsut allow me to host PHP and HTML files? Thanks, will...

Answer:

Apache is a program that attaches itself to port 80 and waits for requests. If you don't have any plug...

Read more

steakyfa... at Yahoo! Answers Mark as irrelevant Undo

I want to allow a help-desk techie to delete files and sub-folders within a folder regardless of the permissio?

I want to allow a helpdesk techy to delete files and subfolders within a folder regardless of the permissions protecting the files and subfolders on a Windows XP Computer. What is the minimum permition that I can grant to help him delete the files and...

Answer:

d.full control........

Read more

Lee at Yahoo! Answers Mark as irrelevant Undo

Why is Apache not listing any files in an open directory?

I've been helping my friend setup his personal website and we have been muddling through with plenty of help from google and a little bit of luck.But recently, I've been stumped by a persistent problem with a directory containing some files. Here's the...

Answer:

To be clear, removing IndexIgnore should fix the problem. If you want to not list indexes in other directories...

Read more

your mildly obsessive average geek at Ask.Metafilter.Com Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.