Apache - Files directive does not work


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Apache - Files directive does not work
# 1  
Old 04-30-2011
Apache - Files directive does not work

HI guys.
when i configure Files in this way:
Code:
<Files ~ "\.png$">     deny from all </Files>

it works. but when defining in this way it doesn't work:
Code:
<Files /var/www/test/file.png>     deny from all </Files>

directives are not inside Directory directive. Could someone help?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Defumask and upload directive in ftp

Hi, I'm aware that this question has been raised earlier and the solution provided has not helped me. So, the issue is that I'm trying to set a defumask to files transferred via ftp to be 002 so that the group may have write permissions to the files uploaded. We have local/system users... (5 Replies)
Discussion started by: maverick_here
5 Replies

2. Shell Programming and Scripting

Shell directive not working

$ cat tmp.sh #!/tools/bin/bash echo $BASH_VERSION $ cat tmp.pl #!/usr/local/bin/perl use strict; use warnings; use DBI; use CGI; system("tmp.sh");$ tmp.sh 3.2.48(1)-release The result is as expected. $ tmp.pl 3.2.25(1)-releaseThe result is not as expected. The shell directive in... (5 Replies)
Discussion started by: carloszhang
5 Replies

3. UNIX for Advanced & Expert Users

Apache mod_userdir does not work

I am trying to access my web site like http://www.mywebsite.com/~someuser My plateform is Ubuntu lucid 10.04 and I am using Apache 2.2.14 I tried to enable mod_userdir by sudo a2enmod userdir sudo /etc/init.d/apache2 restart I then modify <IfModule mod_userdir.c> UserDir... (2 Replies)
Discussion started by: hassan1
2 Replies

4. IP Networking

configure apache to work with ssl

Hi, I need help to configure the apache to work with ssl. I have managed to create self-signed certificate according to the instruction in the following link. So I have the crt file and the key file. however when I add: <Virtualhost *:443> SSLEngine on ... (1 Reply)
Discussion started by: programAngel
1 Replies

5. Web Development

Apache: SSLACARevocation directive issue

I am installing a .crl in my apache config. It looks like this: <VirtualHost default> DocumentRoot "web" ServerName example.com SSLEngine on SSLCertificateFile "cert.crt" SSLCertificateKeyFile "key.key" SSLCertificateChainFile "cert.ca-bundle" SSLProtocol -all +SSLv3... (0 Replies)
Discussion started by: DocBrewer
0 Replies

6. Web Development

regex in apache Allow from directive

Hi, Does the apache Allow from directive support regular expressions? such as: Allow from ^web11blah\.blah\.blah\.yahoo\.com$ what i want to do: allow access from hosts in the range web1160blah.blah.blah.yahoo.com to web1189blah.blah.blah.yahoo.com notice the 1160 to 1189 range as part... (3 Replies)
Discussion started by: Yogesh Sawant
3 Replies

7. Shell Programming and Scripting

vpath directive in make

Hi all, I need to check the contents of my vpath directive in my file. Is it possible to check the contents of the vpath directive as we do for a variable like @echo '$vpath' . Please let me know the above is correct or suggest me the correct one. Thanks in advance. -Jerry (6 Replies)
Discussion started by: jerryragland
6 Replies

8. Programming

Include directive

Hi there, I'm working on a c++ project and I need to use some libraries which are part of a framework. I installed it on my home directory, and alle the .hh are located in subdirs of my home. I'd like to include the files I need just as if they where std c header, that is: #include... (2 Replies)
Discussion started by: clalfa
2 Replies

9. Programming

precompile directive?

hey everyone. havent posted here in a longgggg time. hope to see some familiar faces! heres my question, ive been doing basic programming in c++ again and want to use getch(). in *nix i have to use the curses library, and in windows conio.h is there a way i can have the compiler determine... (2 Replies)
Discussion started by: norsk hedensk
2 Replies

10. UNIX for Dummies Questions & Answers

apache directive only for outside network

I set up a directive for the .htaccess file in one of my web directories. It works fine. Is there a way to force only users outside my internal home network to go through the password authorization? Or, put another way, any user in my network should not have to enter a password. Is that possible? (2 Replies)
Discussion started by: dangral
2 Replies
Login or Register to Ask a Question
ePerl(3pm)						User Contributed Perl Documentation						ePerl(3pm)

NAME
Apache::ePerl - Fast emulated Embedded Perl (ePerl) facility SYNOPSIS
# Apache's httpd.conf file # mandatory: activation of Apache::ePerl PerlModule Apache::ePerl <Directory /root/of/webmaster/area> <Files *.iphtml> Options +ExecCGI SetHandler perl-script PerlHandler Apache::ePerl </Files> </Directory> # optional: configuration of Apache::ePerl <Perl> $Apache::ePerl::Config->{'BeginDelimiter'} = '<?'; $Apache::ePerl::Config->{'EndDelimiter'} = '!>'; $Apache::ePerl::Config->{'CaseDelimiters'} = 0; $Apache::ePerl::Config->{'ConvertEntities'} = 1; </Perl> # optional: activation of Apache::Status for Apache::ePerl <Location /perl-status> Options +ExecCGI SetHandler perl-script PerlHandler Apache::Status </Location> DESCRIPTION
These packages provides a handler function for Apache/mod_perl which can be used to emulate the stand-alone Server-Side-Scripting-Language ePerl (see eperl(3) for more details) in a very fast way. This is not a real 100% replacement for nph-eperl because of reduced functionality under some special cases, principal runtime restrictions and speedup decisions. For instance this variant does not (and cannot) provide the SetUID feature of ePerl nor does it check for allowed filename extensions (speedup!), etc. Instead it uses further features like object caching which ePerl does not use. But the accepted bristled source file format is exactly the same as with the regular ePerl facility, because Apache::ePerl uses the Parse::ePerl package which provides the original ePerl parser and translator. So, any valid ePerl which works under nph-eperl can also be used under Apache::ePerl. The intent is to use this special variant of ePerl for scripts which are directly under control of the webmaster. In this situation no real security problems exists for him, because all risk is at his own hands. For the average user you should not use Apache::ePerl. Instead additionally install the regular stand-alone ePerl facility (nph-eperl) for those users. So, the advantage of Apache::ePerl against the regular nph-eperl is better performance and nothing else. Actually scripts executed under Apache::ePerl are at least twice as fast as under nph-eperl. The reason its not that ePerl itself is faster. The reason is the runtime in- core environment of Apache/mod_perl which does not have any forking overhead. Installation and Configuration First you have to install Apache::ePerl so that Apache/mod_perl can find it. This is usually done via configuring the ePerl distribution via the same Perl interpreter as was used when building Apache/mod_perl. Second, you have to add the following config snippet to Apache's httpd.conf file: PerlModule Apache::ePerl <Directory /root/of/webmaster/area> <Files *.iphtml> Options +ExecCGI SetHandler perl-script PerlHandler Apache::ePerl </Files> </Directory> This forces all files under the directory /root/of/webmaster/area/ with extension .iphtml to be processed by the Apache::ePerl::handler function which emulates the runtime behavior of the stand-alone "eperl" program (when run as a SSSL) up to 90%. If you're not paranoid about security (for instance driving a stand-alone webserver without user accounts) you can also just use PerlModule Apache::ePerl <Files *.iphtml> SetHandler perl-script PerlHandler Apache::ePerl </Files> which enables .iphtml files everywhere. Third, when you want to change the defaults of the ePerl parser, you also can add something like this to the end of the snippet above. <Perl> $Apache::ePerl::Config->{'BeginDelimiter'} = '<?'; $Apache::ePerl::Config->{'EndDelimiter'} = '!>'; $Apache::ePerl::Config->{'CaseDelimiters'} = 0; $Apache::ePerl::Config->{'ConvertEntities'} = 1; </Perl> Fourth, you can additionally enable the mod_perl runtime status which then automatically enables an Apache::ePerl status handler: <Location /perl-status> Options +ExecCGI SetHandler perl-script PerlHandler Apache::Status </Location> This enables the URL "/perl-status" in general and the URL "/perl-status?ePerl" in special. Use it to see how much scripts where run and how much are still cached. AUTHOR
Ralf S. Engelschall rse@engelschall.com www.engelschall.com HISTORY
Apache::ePerl was first implemented by Mark Imbriaco <mark@itribe.net> in December 1996 as a plain Perl module after he has seen the original ePerl from Ralf S. Engelschall. It implemented the ePerl idea, but was not compatible to the original ePerl. In May 1997 Hanno Mueller <hmueller@kabel.de> has taken over the maintenance from Mark I. and enhanced Apache::ePerl by adding caching for P-Code, adding the missing "chdir" stuff, etc. Nearly at the same time Ralf S. Engelschall was unhappy of the old Apache::ePerl from Mark I. and already started to write this version (the one you are current reading its POD). He has rewritten the complete module from scratch, but incorporated the P-Code caching idea and the Apache::Status usage from Hanno M.'s version. The big difference between this one and Mark I.'s or Hanno M.'s versions are that this version makes use of the new Parse::ePerl module which itself incorporates the original ePerl parser. So this version is more compliant to the original ePerl facility. SEE ALSO
Parse::ePerl(3) Web-References: Perl: perl(1), http://www.perl.com/ ePerl: eperl(1), http://www.engelschall.com/sw/eperl/ mod_perl: mod_perl(1), http://perl.apache.org/ Apache: httpd(7), http://www.apache.org/ perl v5.14.2 2012-04-07 ePerl(3pm)