htaccess wird nicht berücksichtigt

Alles, was den Apache betrifft, kann hier besprochen werden.

htaccess wird nicht berücksichtigt

Postby pedro43 » 02. January 2005 20:07

Hi,

wer kann mir sagen wo der Fehler liegt:

/etc/apache2/httpd.conf
Code: Select all

# forbid access to the entire filesystem by default
<Directory /srv/www/*>
#    Options All
#    AllowOverride None
# Options SymLinksIfOwnerMatch
    AllowOverride  AuthConfig
    Order Deny,Allow
    Deny from All
</Directory>


# use .htaccess files for overriding,
AccessFileName .htaccess

# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var


Verzeichniss der geschützt werden soll:
/srv/www/htdocs/web3/webalizer/
ls -al
Code: Select all
drwxr-xr-x  2 10001 10001   368 Jan  2 20:28 .
drwxr-xr-x  4 10001 10001   136 Jan  1 20:26 ..
-rw-r--r--  1 10001 10001   118 Jan  2 20:22 .htaccess
-rw-r--r--  1 10001 10001    40 Jan  2 02:05 .htpasswd
-rw-r--r--  1 root  root   2293 Jan  2 00:00 ctry_usage_200501.png
-rw-r--r--  1 root  root   2511 Jan  2 00:00 daily_usage_200501.png
-rw-r--r--  1 root  root   1742 Jan  2 00:00 hourly_usage_200501.png
-rw-r--r--  1 root  root   3674 Jan  2 00:00 index.html
-rw-r--r--  1 root  root   2059 Jan  2 00:00 usage.png
-rw-r--r--  1 root  root  37396 Jan  2 00:00 usage_200501.html
-rw-r--r--  1 root  root     27 Jan  2 00:00 webalizer.hist


die .htaccess

Code: Select all
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /srv/www/htdocs/web3/webalizer/.htpasswd
require valid-user


Mein System:
Linux SUSE 9.1 mit Kernel: 2.6.5
Apache 2.0.52
PHP 4.3.10
MySQL 4.0.18

Vielleicht noch das:

Code: Select all
LoadModule suexec_module                  /usr/lib/apache2-prefork/mod_suexec.so
LoadModule access_module                  /usr/lib/apache2-prefork/mod_access.so
LoadModule alias_module           /usr/lib/apache2-prefork/mod_alias.so
LoadModule uth_module                   /usr/lib/apache2-prefork/mod_auth.so
LoadModule autoindex_module               /usr/lib/apache2-prefork/mod_autoindex.so
LoadModule dir_module                     /usr/lib/apache2-prefork/mod_dir.so
LoadModule log_config_module              /usr/lib/apache2-prefork/mod_log_config.so
LoadModule mime_module                    /usr/lib/apache2-prefork/mod_mime.so
LoadModule setenvif_module                /usr/lib/apache2-prefork/mod_setenvif.so
LoadModule php4_module                    /usr/lib/apache2-prefork/libphp4.so
#


Ich kann nicht mehr, seit 5 Std. suche ich den Fehler.
Pawel
pedro43
 
Posts: 4
Joined: 02. January 2005 19:50

Postby Wiedmann » 02. January 2005 20:20

Wie sieht der <Directory>-Block für
/srv/www/htdocs
/srv/www/htdocs/web3
/srv/www/htdocs/web3/webalizer
aus?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

htaccess wird nicht berücksichtigt

Postby pedro43 » 02. January 2005 20:27

hi,
danke für so schnelle Antwort.
Die Verzeichnisse habe ich nicht berücksichtigt, ich dachte mit der Definition /srv/www/*
werden alle Unterverzeichnisse berüksichtigt.

Pawel
pedro43
 
Posts: 4
Joined: 02. January 2005 19:50

Postby Wiedmann » 02. January 2005 20:45

Im Prinzip hast du recht. Die Einstellungen werden schon nach unten vererbt. Sie gelten dann so lange, bis sie für ein Unterverzeichnis neu gesetzt werden. Ab diesem Punkt gelten dann die neuen Einstellungen weiter.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby pedro43 » 02. January 2005 20:49

Tja,
dann warum funktioniert das nicht??
Ich komme ins IRC
pedro43
 
Posts: 4
Joined: 02. January 2005 19:50

htaccess wird nicht berücksichtigt

Postby pedro43 » 02. January 2005 21:07

Hi,
meine ganye httpd.conf

Code: Select all
Include /etc/apache2/uid.conf
Include /etc/apache2/server-tuning.conf
ErrorLog /var/log/apache2/error_log
Include /etc/apache2/sysconfig.d/loadmodule.conf
Include /etc/apache2/listen.conf
Include /etc/apache2/mod_log_config.conf
Include /etc/apache2/sysconfig.d/global.conf
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf
Include /etc/apache2/mod_usertrack.conf
Include /etc/apache2/mod_autoindex-defaults.conf
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf
Include /etc/apache2/errors.conf
Include /etc/apache2/ssl-global.conf

<Directory />
#    Options All
#    AllowOverride None
# Options SymLinksIfOwnerMatch
    AllowOverride  AuthConfig 
    Order Deny,Allow
    Deny from All
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess

# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

DirectoryIndex index.html index.html.var
Include /etc/apache2/default-server.conf

Include /etc/apache2/sysconfig.d/include.conf

NameVirtualHost *
<VirtualHost *>
     ServerAdmin root@pawnic.manu.linux
     DocumentRoot /srv/www/htdocs
     ServerName pawnic
     ErrorLog /var/log/apache2/pawnic-error_log
     CustomLog /var/log/apache2/pawnic-access_log common
 </VirtualHost>

Include /etc/apache2/vhosts.conf
pedro43
 
Posts: 4
Joined: 02. January 2005 19:50


Return to Apache

Who is online

Users browsing this forum: No registered users and 2 guests