View previous topic :: View next topic |
Author |
Message |
Sas Veteran
Joined: 05 Jul 2003 Posts: 1229 Location: Germany
|
Posted: Sat Oct 11, 2003 3:11 pm Post subject: 2 apache/php fragen |
|
|
hi leute,
also ich hab mir mal den apache2 mit php4 emerged, läuft soweit auch, allerdings hab ich noch 2 problemchen:
1) wie kann ich den standardpfad (also DocumentRoot) vom apache2 server ändern? wenn ich das in der conf datei ändere bekomme ich beim aufrufen der seite immer 403: forbidden. was muss ich für rechte auf die verzeichnisse setzen? hab schon so ziemlich alles versucht, was mir einfallen ist, hat aber nix geklappt
2) php wird nur ausgeführt, wenn der browser vom root ausgeführt wird. das find ich eigentlich ganz schön komisch, da der benutzer des _browsers_ ja eigentlich total egal sein sollte (ja sogar der rechner, von dem aus aufgerufen wird, sollte egal sein). wenn ein anderer user den browser gestartet hat, wird der php source angezeigt und er will die datei halt speichern.
hat jemand ne idee, danke im voraus, grüsse
S(il)as _________________ 42 |
|
Back to top |
|
|
chris4linux Apprentice
Joined: 13 Nov 2002 Posts: 210 Location: Germany
|
Posted: Sat Oct 11, 2003 6:10 pm Post subject: |
|
|
Hi,
1.) dein root-verzeichnis stellst du einmal in der
/etc/apache2/conf/apach2.conf
ein und dann noch
/etc/apache2/conf/commonapache2.conf
in der letzten ist es ein
Code: |
### This should be changed to whatever you set DocumentRoot to.
###
<Directory /home/httpd/htdocs>
....
|
abschnitt, der muss dann auch geändert werden.
2.)
Ich weiß nicht genau warum das so ist, aber hast du in der /etc/conf.d/apache2 auch bei den opts. ein
Code: |
APACHE2_OPTS="-D PHP4"
|
mit drin?
Gruß,
Chris _________________ NOTICE: alloc: /dev/null: filesystem full |
|
Back to top |
|
|
Sas Veteran
Joined: 05 Jul 2003 Posts: 1229 Location: Germany
|
Posted: Sun Oct 12, 2003 4:24 pm Post subject: |
|
|
vielen dank, der eintrag in der commonapache2.conf hat gefehlt. danach ging auch der php-kram _________________ 42 |
|
Back to top |
|
|
Yonathan l33t
Joined: 05 Jan 2005 Posts: 662
|
Posted: Thu Apr 28, 2005 10:58 pm Post subject: |
|
|
hallo.
ich habe das gleiche problem.
habe beim partitionieren der festplatte extra einen abschnitt erstellt, der /www heißt. dorthin soll das root-verzeichnis des apache führen, sodass ich dort meine homepages usw schreiben und testen kann.
in der /etc/apache2/conf/apache2.conf
habe ich breits den abschnitt mit dem root-directory auf /www geändert und ebenfalls in der commonapache2.conf, obwohl da die zeile auskommentiert war.
wenn ich jetzt apache neu starte, dann bekomme ich immer die meldung:
Code: | bash-2.05b# /etc/init.d/apache2 restart
* Stopping apache2...
Warning: DocumentRoot [/var/www/localhost/htdocs] does not exist [ ok ]
* Starting apache2... [ ok ] |
auf meine datein im /www kann ich immernoch nicht zugreifen, obwohl der user in der apache-gruppe ist und die aufzurufende datei user-rechte hat.
wie komme ich an meine documente ran?
yona _________________ Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5 |
|
Back to top |
|
|
Neo_0815 l33t
Joined: 24 Feb 2003 Posts: 815 Location: Leipzig
|
|
Back to top |
|
|
Yonathan l33t
Joined: 05 Jan 2005 Posts: 662
|
Posted: Fri Apr 29, 2005 12:05 am Post subject: |
|
|
ich dachte, das hätte ich mit der änderung der beiden datein getan ?
wie macht man es denn dann, wenn nicht so? _________________ Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5 |
|
Back to top |
|
|
Neo_0815 l33t
Joined: 24 Feb 2003 Posts: 815 Location: Leipzig
|
Posted: Fri Apr 29, 2005 9:37 am Post subject: |
|
|
Yonathan wrote: | ich dachte, das hätte ich mit der änderung der beiden datein getan ?
wie macht man es denn dann, wenn nicht so? |
Warning: DocumentRoot [/var/www/localhost/htdocs] does not exist
Er sagt dir doch den Fehler, irgendwo hast du noch ein falsches DocumentRoot stehen was es nicht gibt! Also grep doch einfach mal danach.
MfG _________________ [img:76661e22b8]http://www.biersekte.de/biersektebanner.gif[/img:76661e22b8] |
|
Back to top |
|
|
Yonathan l33t
Joined: 05 Jan 2005 Posts: 662
|
Posted: Fri Apr 29, 2005 9:42 am Post subject: |
|
|
grep 'DocumentRoot' apache2.conf commonapache2.conf liefert mir:
Code: | apache2.conf:DocumentRoot /www
commonapache2.conf:### DocumentRoot: The directory out of which you will serve your
commonapache2.conf:## DocumentRoot /www/
commonapache2.conf:### This should be changed to whatever you set DocumentRoot to. |
es ist wirklich strange.... jetzt wird alles akzeptiert und /www ist das documentroot.
jetzt habe ich nurnoch probs mit den rechten, um die dateien in dem ordner zu öffnen.
[edit] warum steht eigentlich nirgends, dass man ein
auf den DocumentRoot ordner ausführen muss??? und warum steht sowas nirgends?
trotzdem danke.
yona _________________ Athlon XP+ 2400 Thunderbird,
Abit NF7
1536MB DDR (266),
Radeon 9200 (256mb)
gentoo 2.6.19-r5 |
|
Back to top |
|
|
|