WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Linux, UNIX, Open Source (http://www.wcm.at/forum/forumdisplay.php?f=13)
-   -   Apache: Files ausserhalb DocumentRoot (http://www.wcm.at/forum/showthread.php?t=228829)

robi1a 10.06.2008 22:25

Apache: Files ausserhalb DocumentRoot
 
Hallo
Habe ein kleines Problem mit dem apache2 unter SUSE 10.3.
Ich möchte auf einer html-Seite auf Files verweisen, die nicht unter DocumentRoot (DocumentRoot "/BUERO/http") sind. Das ist zum Beispiel die Linux Dokumentation unter /usr/share/doc. Die Verzichnisse sind mit <Directory ...> ... </Directory> eingetragen und berechtig. Option Indexes FollowSymLinks ist gesetzt

Ich bekomme folgende Meldungen:

Wenn ich die Files in /usr/share/doc/... direkt anspreche
Im Browser: Objekt nicht gefunden Error 404
Im apache error_log: File does not exist
Wenn ich einen Symlink auf /usr/share/doc/... setze
Im Browser: Zugriff verweigert
Im apache error_log: Symbolic link not allowed or link target not accessible: /BUERO/http/system_doku
Ich hoffe mir kann da wer weiter helfen wie ich auf diese Files mit Apache zugreifen kann.

Dumdideldum 11.06.2008 00:19

wie sehen die Rechte der Verzeichnisse bzw. Files im /usr/share/doc/ aus d.h. hat der Indianer Prozeß darauf überhaupt Zugriffsrechte ?

Check auch mal /var/log/apache2/error.log

m@rio 11.06.2008 09:19

Links ausserhalb von DocumentRoot funktionieren so nicht.

Entweder richtest du einen Alias ein http://httpd.apache.org/docs/2.0/mod...ias.html#alias oder du machst es mit Symlinks und erlaubst diese explizit Options FollowSymLinks bzw. Options SymLinksIfOwnerMatch

Dumdideldum 11.06.2008 09:22

[quote=robi1a;2283213]
Option Indexes FollowSymLinks ist gesetzt

robi1a 13.06.2008 10:50

Hallo
Ja, genau das mit dem FollowSymlinks wollte ich machen.

asterix:/BUERO/http # ls -l
total 11
-rw-r--r-- 1 wwwrun root 1587 May 5 17:56 admin.html
lrwxrwxrwx 1 root root 25 Jun 13 09:29 doku -> /BUERO/samba/Install/EDV/
-rw-r--r-- 1 wwwrun root 720 May 5 17:55 index.html
-rw-r--r-- 1 wwwrun root 1136 Jun 13 09:28 linuxdoc.html
-rw-r--r-- 1 wwwrun root 319 Jul 26 2004 mail.html

doku ist der Symlink ausserhalb DoumentRoot
asterix:/BUERO/http # ls -l /BUERO/samba/Install/
total 41
drwxrwsr-x 3 admin users 1024 May 15 20:21 EDV

apache config:
DocumentRoot "/BUERO/http"

<Directory "/BUERO/http">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/BUERO/samba/Install">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Beim Aufruf des entsprechenden Links kommt folgendes:
Im apache error_log
Symbolic link not allowed or link target not accessible: /BUERO/http/doku, referer: http://asterix/linuxdoc.html

Im Browser:
Zugriff verweigert
Error 403

Dumdideldum 16.06.2008 08:52

Mach mal probeweise ein:

chown wwwrun:root /BUERO/samba/Install/EDV/
bzw.
chown wwwrun:root den Symlink doku und probeweise ein

Code:

AllowOverride All
zum testen.

robi1a 16.06.2008 20:28

Hat leider nichts genützt. Selber Fehler

colossus 17.06.2008 09:14

Genau dafuer gibt's "Alias", nech? ;)


Alle Zeitangaben in WEZ +2. Es ist jetzt 00:03 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag