kdyz dam na konec httpd.conf toto:
<Directory /var/www/html/films>
AuthType Basic
AuthName Filmy
AuthUserFile /etc/httpd/conf/users
AuthGroupFile /etc/httpd/conf/groups
require group mojegrupa
a pak dam service httpd restart tak se to v pohode vypne,ale pri startu to napise Failed,kdyz to odstranim tak zase vse OK:
[Wed Mar 21 15:14:24 2007] [error] [client 192.168.80.140] Directory index forbidden by Options directive: /var/www/html/
[Wed Mar 21 15:17:19 2007] [error] [client 192.168.80.140] (2)No such file or directory: Could not open group file: /etc/httpd/conf/groups
[Wed Mar 21 15:17:45 2007] [notice] caught SIGTERM, shutting down
[Wed Mar 21 15:17:45 2007] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Wed Mar 21 15:17:45 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Mar 21 15:17:45 2007] [notice] Digest: generating secret for digest authentication …
[Wed Mar 21 15:17:45 2007] [notice] Digest: done
[Wed Mar 21 15:17:45 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed Mar 21 15:17:45 2007] [notice] Apache/2.2.3 (Fedora) configured – resuming normal operations
[Wed Mar 21 15:17:49 2007] [error] [client 192.168.80.140] (2)No such file or directory: Could not open group file: /etc/httpd/conf/groups
[Wed Mar 21 15:17:53 2007] [error] [client 192.168.80.140] (2)No such file or directory: Could not open group file: /etc/httpd/conf/groups
[Wed Mar 21 15:17:56 2007] [error] [client 192.168.80.140] Directory index forbidden by Options directive: /var/www/html/
[Wed Mar 21 15:18:02 2007] [error] [client 192.168.80.140] (2)No such file or directory: Could not open group file: /etc/httpd/conf/groups
[Wed Mar 21 15:18:16 2007] [error] [client 192.168.80.140] Directory index forbidden by Options directive: /var/www/html/
[Wed Mar 21 15:18:57 2007] [notice] caught SIGTERM, shutting down
[Wed Mar 21 15:18:58 2007] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Wed Mar 21 15:18:58 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Mar 21 15:18:59 2007] [notice] Digest: generating secret for digest authentication …
[Wed Mar 21 15:18:59 2007] [notice] Digest: done
[Wed Mar 21 15:18:59 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed Mar 21 15:18:59 2007] [notice] Apache/2.2.3 (Fedora) configured – resuming normal operations
[Wed Mar 21 15:19:02 2007] [error] [client 192.168.80.140] (2)No such file or directory: Could not open group file: /etc/httpd/conf/groups
[Wed Mar 21 15:19:08 2007] [error] [client 192.168.80.140] (2)No such file or directory: Could not open group file: /etc/httpd/conf/groups
Tak zde je ten navod jako prvni sem si na konec httpd.conf(/etc/httpd/conf) dal tento text:
<Directory /var/www/html/films> #slozka ktera bude pristupna na heslo
AuthType Basic #typ prihlaseni
AuthName Filmy #zobrazi se pri prihlaseni
AuthUserFile /etc/httpd/conf/users #slozka s uzivateli
AuthGroupFile /etc/httpd/conf/group #slozka se skupinami
require group mojegrupa #skupina
Tak to mam httpd.conf
pozn./nekde…=/etc/httpd/conf
nyni si vytvorime group mojegrupa s uzivatelema user1 a user2
echo “mojegrupa: user1 user2” > /nekde…/group #pou6ijte oba dva prikazy
echo “mojegrupa: user1 user2” > /nekde…/users
nazvy uzivatelu si dejte podle sebe