PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Apache 2 und Suse 9 Problem



realtec
29.02.04, 11:19
Hallo zusammen!

Wie kann ich den Apache 2 einstellen, das immer der komplette Verzeichnisinhalt angezeigt wird? Es soll auch der Inhalt angezeigt werden, wenn keine index.html vorhanden ist. Jetzt kommt bei mir eine "Zugriff verweigert" Warnung....

Bubble
29.02.04, 12:01
Das musst du in der httpd.conf in einer Directory-Direktive einstellen.

Nimm am Besten das Verzeichnis, welches bei dir DocumentRoot ist, bspw. /var/www, dann geht das was du möchtest mit folgenden Einstellungen:

<Directory /var/www/>
Options Indexes
[...]
</Directory>

Naja da kann noch wesentlich mehr stehen, wichtig ist aber die Indexes-Option. Du solltest auch darauf achten ob du über die AllowOverride-Option einer evtl. vorhandenen .htaccess gestattest, Optionen zu überschreiben, und ob eine solche Datei vorhanden ist.
Bubble

P.S.: Achja, Server danach selbstverständlich neu starten ...

realtec
29.02.04, 12:06
geht immer noch nicht :mad:
so sieht meine httpd.conf in teilen aus:

# forbid access to the entire filesystem by default
<Directory />
Options Indexes
AllowOverride None
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

Bubble
29.02.04, 14:12
Ändere halt mal das

Deny from all

in

Allow from all

Bubble

realtec
29.02.04, 16:19
Original geschrieben von Bubble
Ändere halt mal das

Deny from all

in

Allow from all

Bubble

Hat halt auch nichts gebracht!
Jetzt sieht es so aus:

# forbid access to the entire filesystem by default
<Directory />
Options Indexes
AllowOverride None
Order deny,allow
Allow from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

Bubble
29.02.04, 19:03
Tja ... vielleicht hilft es dir wenn du meine Konfiguration mal anschaust. DocumentRoot ist auf /var/www. Bei mir funktioniert das mit dem Anzeigen der Verzeichnisse. Vielleicht solltest du mal einen eigenen Eintrag für dein DocumentRoot erstellen, hast du ja nicht wie ich das sehe ...



# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options SymLinksIfOwnerMatch
AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory /var/www/>

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes Includes FollowSymLinks MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

Bubble

realtec
29.02.04, 19:16
die konfig datei ist aber keine von suse 9.0, oder??
suse hat die datei nämlich mehrfach aufgeteilt, und damit komme ich gar nicht zurecht :-((

Bubble
29.02.04, 22:55
Nein, das ist eine von Debian. Was heißt mehrfach aufgeteilt? Welche Apache-Version verwendest du denn? Hast du dennoch mal versucht den Eintrag für DocumentRoot einfach unter den Eintrag für / zu setzen und den Server neu zu starten?
Bubble

realtec
01.03.04, 18:13
Original geschrieben von Bubble
Nein, das ist eine von Debian. Was heißt mehrfach aufgeteilt? Welche Apache-Version verwendest du denn? Hast du dennoch mal versucht den Eintrag für DocumentRoot einfach unter den Eintrag für / zu setzen und den Server neu zu starten?
Bubble
ja habe ich, leider ohne erfolg
ist apache 2.0.48. und mit aufgeteilt meine ich, das amche teile in extra conf datei untergebracht sind, und mit: include... importiert werden.
soll übersichtlicher sein, was ich allerdings nicht finde, da ich so mehrere dateien öffnen muss....