Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache sperrt einzelne unterverzeichnisse
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Wed Nov 22, 2006 7:05 pm    Post subject: apache sperrt einzelne unterverzeichnisse Reply with quote

nabend.

ich habe kürzlich mal ein update einiger internetseiten betrieben und diese in neuen ordnern abgelegt. seltsamerweise kann ich sie mir nicht anschauen, ein
http://localhost/neu
z.b. liefert mir ein access denied
auf die alten seiten und in die alten ordner komme ich jedoch ohne weiteres rein, was mir irgendwie sehr verwundert. die rechte sind für den alten und neuen ordner gleich, ich habe extra nochmal geschaut, versteckte dateien gibt es auch keine.

Code:
ll /www
drwxr-xr-x  8 mirco  users   1576 27. Jun 17:30 kirche <-- kann betreten werden
drwxr-xr-x  3 mirco  users    200 10. Nov 01:48 neu <-- kann nicht betreten werden

im /var/log/apache2/error_log steht:
Code:
[Wed Nov 22 20:02:23 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /www/neu/

die frage ist nun: was ist das für eine "rule", die mir da was verbietet? bzw warum ist da überhaupt was verboten?

yona
_________________
Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5
Back to top
View user's profile Send private message
zworK
Guru
Guru


Joined: 07 May 2004
Posts: 308

PostPosted: Wed Nov 22, 2006 7:42 pm    Post subject: Reply with quote

Bin jetzt keine Apache Experte, aber
Code:
[Wed Nov 22 20:02:23 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /www/neu/

hört sich für mich spontan nach gesetztem
Code:
Options -Indexes
an. Global oder für das Verzeichnis gesetzt.
Vorrausgesetzt dass keine DirectoryIndex Datei wie index.html, index.php in den Verzeichnissen vorhanden sind. Diese sollte unabhängig von der oben genannter Option angezeigt werden.
Back to top
View user's profile Send private message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Fri Nov 24, 2006 6:19 pm    Post subject: Reply with quote

aha... und wo finde ich diese option???

in jedem der verzeichnisse ist eine index.php/html
_________________
Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Fri Nov 24, 2006 6:57 pm    Post subject: Reply with quote

Yonathan wrote:
aha... und wo finde ich diese option???

in jedem der verzeichnisse ist eine index.php/html

:arrow: http://httpd.apache.org/docs/2.2/mod/core.html#options
Sprich du musst eine .htaccess-Datei erstellen und die genannte Zeile dort eintragen.
_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
mr_elch
Apprentice
Apprentice


Joined: 18 Jun 2004
Posts: 170

PostPosted: Fri Nov 24, 2006 7:16 pm    Post subject: Reply with quote

Quote:
Sprich du musst eine .htaccess-Datei erstellen und die genannte Zeile dort eintragen.

Wäre es nicht einfacher, das direkt in der apache.conf zu ändern?
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Fri Nov 24, 2006 10:20 pm    Post subject: Reply with quote

mr_elch wrote:
Quote:
Sprich du musst eine .htaccess-Datei erstellen und die genannte Zeile dort eintragen.

Wäre es nicht einfacher, das direkt in der apache.conf zu ändern?

Ginge natürlich auch, wäre aber auch unsicherer.
_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
mr_elch
Apprentice
Apprentice


Joined: 18 Jun 2004
Posts: 170

PostPosted: Sat Nov 25, 2006 8:03 am    Post subject: Reply with quote

Warum unsicherer? Du kannst es dort doch ebenfalls auf einzelnen Verzeichnisse begrenzen. Es hat zusätzlich den Vorteil, da Du die Einstellungen dort zentral verwalten kannst und nicht .htaccess-Dateien im gesamten Webdir verstreuen musst.
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Sat Nov 25, 2006 10:49 am    Post subject: Reply with quote

mr_elch wrote:
Warum unsicherer? Du kannst es dort doch ebenfalls auf einzelnen Verzeichnisse begrenzen. Es hat zusätzlich den Vorteil, da Du die Einstellungen dort zentral verwalten kannst und nicht .htaccess-Dateien im gesamten Webdir verstreuen musst.

Ich dachte du meintest das nach dem Motto "Einmal global setzen und gut.".
Wenn man es natürlich so macht, wie jetzt beschrieben, spricht natürlich nichts dagegen.
_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Sun Nov 26, 2006 11:59 am    Post subject: Reply with quote

ok... danke schonmal dafür.. ich werde mal schauen, wo und ob ich die option in der apache.conf finde und auch die einschränkungen auf die einzelnen ordner, bzw den überordner.

yona
_________________
Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Sun Nov 26, 2006 2:13 pm    Post subject: Reply with quote

Das ganze kann dann, je nach Konfiguration, z.B. so aussehen:
Code:
<Directory "/path/to/htdocs">
    Options Indexes FollowSymLinks MultiViews Includes
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Mon Nov 27, 2006 9:57 am    Post subject: Reply with quote

oh :) danke :)

werde es mal ausprobieren!

yona
_________________
Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5
Back to top
View user's profile Send private message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Tue Nov 28, 2006 8:56 pm    Post subject: Reply with quote

klappt ja schon ganz gut...

problem ist nur, dass mir jetzt datei-listen angezeigt werden und die dateien wie index.htm oder index.php nicht ausgeführt werden :(

sehe jetzt, was sich in dem ordner befindet, aber nicht, wie das, was ich da geschrieben habe, aussieht :(

yona
_________________
Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum