Apache - auth
Jaroslav Hampl
hampl na ttc.cz
Pondělí Srpen 10 09:12:07 CEST 1998
Jaroslav Klaus wrote:
>
> On Mon, 10 Aug 1998, Jaroslav Hampl wrote:
>
> > Jaroslav Klaus wrote:
> > >
> > > On Fri, 7 Aug 1998, Jaroslav Hampl wrote:
> > >
> > > > Jaroslav Klaus wrote:
> > > > >
> > > > > No tak s tim jsem si hral asi hodinu nez me to prestalo bavit.
> > > > > Nepodarilo se. S Directory to chodi s Files ne.
> > > > >
> > > > > Jo, jinak je to Apache 1.3.1
> > > > >
> > > >
> > > > A co takhle pokuzit Location ?
> > > >
> > > > Misto" <Files /usr/local/www/html/soubor.htm >
> > > > Pouzit: <Location /soubor.htm >
> > >
> > > Ani to. Ve ktere verzi to nekomu chodi?
> >
> > Snad ve vsech, co jsem kdy videl. ( 1.3.1, 1.2 ... ).
>
> Opravdu to byla v te 1.3.1 direktiva <Files> ? At se snazim jakkoliv tak
> bez uspechu.
>
> Jarda
V manualu pisou neco jako:
##################################################
<Files> directive
Syntax: <Files filename> ... </Files>
Context: server config, virtual host, htaccess
Status: core
Compatibility: only available in Apache 1.2 and above.
The <Files> directive provides for access control by filename. It is
comparable to the <Directory> directive and <Location> directives. It
should be matched with a </Files>
directive. Directives that apply to the filename given should be listed
within. <Files> sections are processed in the order they appear in the
configuration file, after
the <Directory> sections and .htaccess files are read, but before
<Location> sections.
The filename argument should include a filename, or a wild-card string,
where `?' matches any single character, and `*' matches any sequences of
characters. Extended
regular expressions can also be used, with the addition of the ~
character. For example:
<Files ~ "\.(gif|jpe?g|png)$">
would match most common Internet graphics formats. In Apache 1.3 and
later, <FilesMatch> is perferred, however.
Note that unlike <Directory> and <Location> sections, <Files> sections
can be used inside .htaccess files. This allows users to control access
to their
own files, at a file-by-file level. When used in an .htaccess file, if
the filename does not begin with a / character, the directory being
applied will be prefixed
automatically.
#######################################
Jinak , zajimava vlastnost :
Dejme tomu, ze tam mam soft link z /var/lib/httpd na /www.
DocumentRoot v srm.conf je nastaven na /www/html.
V pripade , ze napisu <Files /var/lib/httpd/html/soubor.htm>
tak to nefunguje a v pripade,
ze tam dam : <Files /www/html/soubor.htm> tak to funguje.
Kdyz zmenim DocumentRoot na /var/lib/httpd , bude to fungovat zase
opacne.
J.H.
Další informace o konferenci Linux