megoldva :: suPHP + Plesk 8.6 => Internal Server Error

Fórumok

Sziasztok,

Sajnos kevés ebben a tapasztalatom és hosszas sikertelen google-zás után gondoltam, hátha lenne Valakinek ötlete a lentiekkel kapcsolatban,

# platforom (adott),

Plesk Control Panel version: psa v8.6.0_build86080930.03 os_SuSE 10.3
Operating system: Linux 2.6.18-028stab059.6
PHP_VERSION 5.2.6
Server version: Apache/2.2.4

# probléma,

Apache / php jogosultsági problémák megoldása érdekében szeretném telepíteni a suPHP-t (suphp-0.6.2-10.40.i586) de sajnos ez eddig még nem sikerült...

Az alábbi lépéseket követtem, de Plesk-nél nem tudom mit kéne beállítanom...

link: http://www.howtoforge.com/install-suphp-on-various-linux-distributions-…

Majd a következő hibaüzenetet kapom,

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

Előre is köszi!

Üdv: Dani

# megoldás

- Plesk 9.01-ra update, ebben már támogatott a FastCGI
- suEXEC telepítése
+ Joomla CMS érdekében a /var/lib/php5 jogosultságok beállítása

# Köszi Mindenkinek! :-]

Hozzászólások

More information about this error may be available in the server error log.

ahogy ez is mondja az apache error logban benne lesz mi a gond

Core2Duo T7100, 2.5G, Ubuntu 8.04, 2.6.28.3

Köszi ;-]

Megnéztem, de egyenlőre csak bámulom...

[Tue Feb 10 11:21:01 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 11:21:02 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Tue Feb 10 11:21:02 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Tue Feb 10 11:21:02 2009] [warn] Init: SSL server IP/port conflict: default-87-229-45-121:443 (/etc/apache2/conf.d/zz010_psa_httpd.conf:84) vs. webmail:443 (/etc/apache2/conf.d/zz010_psa_httpd.conf:139)
[Tue Feb 10 11:21:02 2009] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
[Tue Feb 10 11:21:02 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Feb 10 11:21:02 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Tue Feb 10 11:21:02 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Tue Feb 10 11:21:02 2009] [warn] Init: SSL server IP/port conflict: default-87-229-45-121:443 (/etc/apache2/conf.d/zz010_psa_httpd.conf:84) vs. webmail:443 (/etc/apache2/conf.d/zz010_psa_httpd.conf:139)
[Tue Feb 10 11:21:02 2009] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
[Tue Feb 10 11:21:02 2009] [notice] mod_python: Creating 8 session mutexes based on 10 max processes and 0 max threads.
[Tue Feb 10 11:21:02 2009] [notice] mod_python: using mutex_directory /tmp
[Tue Feb 10 11:21:03 2009] [notice] Apache/2.2.4 (Linux/SUSE) mod_ssl/2.2.4 OpenSSL/0.9.8e mod_python/3.3.1 Python/2.5.1 mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations

Plesk-el nem próbáltam és nem is állítottam semmit (erre szerintem nincs is ráhatása).

A phpinfo nem fut le, mert erre is "500 Internal Server Error"-t kapok...

selinux, itt mire gondolsz (Security-Enhanced Linux / AppArmor / ?)?

Nincsen valami más barátságosabb megoldás a php / apache jogosultságok kezelésére (no nem a 777-re gondoltam ;] ?

azt tippelnem hogy plesk hasznalna pl. mod_rewrite-ot es a rewrite modul nincs bekapcsolva.
de logokban benne lesz.

Tyrael

Hali!

Én a helyedben elfelejteném a suphp-t, mert lassú. (Nagyon)
Minden egyes kattintáskor fork, php elindul, fordít, eredmény visszaad, kilép.

Van egy ilyen (debian, ubuntu): libapache2-mod-fcgid
Ha ezt felrakod, plusz bekapcsolod az apache suexec-ét, és felrakod az apc-t,
akkor be tudod állítani úgy a cuccot, hogy más-más userként fut,
de még kódcache-t is tudsz használni, a php nem forkol minden kattintáskor,
szóval csak nagyon kicsivel lassabb, mintha modulból menne a cucc.

Hátránya, hogy hekkelni kell, az apache suecex forrását egy kicsit át
kell írni. :)

Anno régen csináltam ilyesmit, lehet, hogy hiányos lesz, amit írok,
de ez alapján szerintem el lehet indulni, meg kérdezhetsz is.

apache, php:
apache2 apache2-mpm-worker apache2-utils apache2.2-common libapr1
libaprutil1 libexpat1 php5-cgi php5-common ucf libapache2-mod-fcgid
php-apc php5-cli php5-mysql php5-pgsql libapache2-mod-fcgid

# a2enmod userdir
# a2enmod rewrite

fcgid:
# vim /etc/apache2/mods-enabled/fcgid.conf

AddHandler fcgid-script .fcgi
AddHandler fcgid-script .php
IPCConnectTimeout 20

# cat /etc/apache2/phpwrap
#!/bin/sh
PHPRC="/etc/php5/cgi/"
export PHPRC
PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
exec /usr/bin/php5-cgi

# chmod 755 /etc/apache2/phpwrap

Ezután fut a FastCGI -s php, de csak www-data-ként.

# a2enmod suexec

patkolás

development libek:
# apt-get install apache2-threaded-dev comerr-dev libapr1-dev libaprutil1-dev
libexpat1-dev libkadm55 libkrb5-dev libldap2-dev libpcre3-dev
libpcrecpp0 libpq-dev libsqlite3-dev libssl-dev uuid-dev zlib1g-dev dpkg-dev
dpatch debhelper dh-make gettext html2text intltool-debian po-debconf
# a2enmod suexec
# cd /root/
# mkdir apache
# cd apache/
# apt-get source apache2
# cd /root/apache/apache2-2.2.3

# vim /root/apache/apache2-2.2.3/support/suexec.c
az átírást értelemszerűen, a megfelelő ellenőrzések kihagyása,
ha a php wrapper indul el.
lásd a forrásban: http://pastebin.com/fda883de
(499. sortól.)

# debian/rules binary
# cd /root/apache/apache2-2.2.3/debian/build-tree/worker/support

ebben a könyvtárban lesz a suexec, ami kell.

# cp /usr/lib/apache2/suexec /usr/lib/apache2/suexec.old
# cp suexec /usr/lib/apache2/
# chmod +s /usr/lib/apache2/suexec
# chown root:www-data /usr/lib/apache2/suexec
# chmod o= /usr/lib/apache2/suexec

# /etc/init.d/apache2 stop
# /etc/init.d/apache2 start

Ezután már megy.

Fontos, hogy a suexec.c azzal kezdődik, hogy "ezt ne módosítsd."
Ez nem véletlenül van így, könnyen sechole-t lehet vele nyitni.

A fentebb beküldött forrásért nem vállalok felelősséget, szóval
csak akkor használd, ha átnézted a kódot, és te sem találtál
benne lyukat.

Feltétlenül olvasd el a http://httpd.apache.org/docs/2.2/suexec.html doksit.

A szívást megéri, mert nekem sikerült érzésre 60-70% gyorsulást elérni vele,
bár pontosan nem mértem le.