Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2 apache/php fragen
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
Sas
Veteran
Veteran


Joined: 05 Jul 2003
Posts: 1229
Location: Germany

PostPosted: Sat Oct 11, 2003 3:11 pm    Post subject: 2 apache/php fragen Reply with quote

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
View user's profile Send private message
chris4linux
Apprentice
Apprentice


Joined: 13 Nov 2002
Posts: 210
Location: Germany

PostPosted: Sat Oct 11, 2003 6:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sas
Veteran
Veteran


Joined: 05 Jul 2003
Posts: 1229
Location: Germany

PostPosted: Sun Oct 12, 2003 4:24 pm    Post subject: Reply with quote

vielen dank, der eintrag in der commonapache2.conf hat gefehlt. danach ging auch der php-kram :)
_________________
42
Back to top
View user's profile Send private message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Thu Apr 28, 2005 10:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Neo_0815
l33t
l33t


Joined: 24 Feb 2003
Posts: 815
Location: Leipzig

PostPosted: Thu Apr 28, 2005 11:59 pm    Post subject: Reply with quote

Hast du denn das DocumentRoot geändert, sieht nicht so aus .... ( Die Option DocumentRoot, nicht die Directory Directive ).

Gruß
_________________
[img:76661e22b8]http://www.biersekte.de/biersektebanner.gif[/img:76661e22b8]
Back to top
View user's profile Send private message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Fri Apr 29, 2005 12:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Neo_0815
l33t
l33t


Joined: 24 Feb 2003
Posts: 815
Location: Leipzig

PostPosted: Fri Apr 29, 2005 9:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Yonathan
l33t
l33t


Joined: 05 Jan 2005
Posts: 662

PostPosted: Fri Apr 29, 2005 9:42 am    Post subject: Reply with quote

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
Code:
chmod -R 755 *
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
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