I put this in httpd.conf
Reloaded apache.
<FilesMatch "\.(gif|jpe?g|png)$">
Order allow,deny
Deny from all
</FilesMatch>
I'm expecting no files to be accessible from browser except image files, but I can access no probs test.php
what am I doing wrong?
I have a few private files in a public folder and I want to block access to them.
For example lets say I have the following files tree:
DictA
FileA
FileA
FileB
FileC
I want to block access to FileB and FileA in the current directory and allow access to the FileA in the DictA directory.
I am using htaccess to block all access to our dev server with the following code:
AuthType Basic
AuthName "Auth"
AuthUserFile /var/htpasswd
Require valid-user
Order allow,deny
Satisfy any
I have set a variable in Apache httpd.conf called DEV. I am using it for my config files in php but how would I use it only to use the auth when the DEV setting
Hi,
i want to set up .htaccess on my Apache web server such that all users are straight-up denied access except one user which is my IP.
What the heck... There's only one argument, the regex.
Earlier in the file, I denied all.
Now I just want to allow access to index.php, as well as images, css, and javascript.
<FilesMatch ~ "(?i:index.php|\.gif|\.jp?g|\.png|\.css|\.js)$" >
Order allow,deny
Allow from all
</FilesMatch>
Help.
I have an Apache config that restricts access to to a website, using the following code -
<Directory /var/www/html/website/test/>
AuthName "Dyne Drewett Test Site"
AuthType Basic
AuthUserFile /usr/local/etc/apache/.htpasswd
require valid-user
</Directory>
Does anybody know how I can amend this to allow full, unauthorised access to one directory under
I am using Ubuntu 12.04 and trying to use .htaccess on a page with apache2 server on it.
My .htaccess file looks like this:
AuthType Basic
AuthName "Password Required"
AuthBasicProvider file
AuthUserFile /home/janeb/.htpasswd
require valid-user
/home/janeb/.htpasswd file is:
inb351:$apr1$Ya4tzYvr$KCs3eyK1O2/c7Q9zRcwn..
and /etc/apache2/sites-available/default file is :
UserDir public_html
&
How could I give different access to sub-directories?
The first problem is: I must let the programmers modify the htaccess files, but not the access control.
I have access only to htaccess directives for once, not to the httpd.conf of Apache.
And here are my folders:
~/www/
~/beta/ -> group betatesters developers
~/dev/ -> group developers
I would like to have only one .htaccess located
I know there are a number of different ways to redirect using apache although I wanted to check if this is the correct way of doing it via virtual host?
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example/public
<Directory "/var/www/example/public">
Options +FollowSymlinks
# Prevent Direct Access to files
<FilesMatch "\.