Dieses HOWTO gibt es auch noch für einen Suse 10.1 Confixx Server, dass aber erst noch kommt.
Dieses HOWTO wurde unter Suse 9.3 mit Plesk 8.0.1 Apache/2.0.53 erstellt.
Ich fang einfach mal an
Wir erstellen uns ein Arbeitsverzeichniss:
Code: Select all
mkdir arbeitv
Code: Select all
cd arbeitv
Code: Select all
tar -xzf php-5.2.1.tar.gz
Code: Select all
tar -xzf suphp-0.6.2.tar.gz
Code: Select all
cd php-5.2.1
Code: Select all
./configure --with-exec-dir=/opt/php5.2.1-fastcgi/bin --prefix=/opt/php5.2.1-fastcgi --includedir=/opt/php5.2.1-fastcgi/include --datadir=/opt/php5.2.1-fastcgi/lib --bindir=/opt/php5.2.1-fastcgi/bin --without-pear --with-imap --with-imap-ssl --with-mime-magic --with-mhash --with-ldap --with-gmp --with-gettext --enable-track-vars --with-mcrypt --with-gd --with-curl --disable-cli --with-mysql --enable-magic-quotes --enable-safe-mode --enable-zend-multibyte --enable-zip --enable-libxml --enable-sysvmsg --enable-sysvsem --with-zlib --with-openssl --with-bz2 --enable-sysvshm --enable-sockets --enable-soap --enable-shmop --enable-mbstring --enable-ftp --enable-exif --enable-dbase --enable-calendar --enable-bcmath --enable-memory-limit --enable-force-cgi-redirect --enable-safe-mode --with-pcre-regex --without-sqlite --without-mm --enable-fastcgi
Wichtig ist beim configure nur, dass das PHP nicht mit --with-config-file-path compiliert wird da ansonsten über suPHP keine eigener Path für die php.ini angegeben werden kann.
Wenn der configure fertig ist machen wir ein:
Code: Select all
make
Code: Select all
make install
Code: Select all
/opt/php5.2.1-fastcgi/bin/php -v
Code: Select all
PHP 5.2.1 (cgi-fcgi) (built: Feb 12 2007 15:38:53)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
Wir wechseln ins Verzeichniss :
Code: Select all
cd /arbeitv/suphp-0.6.2
führen das configure für suPHP aus
Code: Select all
./configure --sysconfdir=/etc --with-apxs=/usr/sbin/apxs2 --with-min-uid=500 --with-min-gid=500 --with-apache-user=wwwrun --with-php=/opt/php5.2.1-fastcgi/bin/php --with-setid-mode=owner --with-logfile=/var/log/apache2/suPHP.log
Sollte der configure einen Fehler bringen mit APR
dieses ans configure anhängen.
Code: Select all
--with-apr=/usr/bin/apr-1-config
Code: Select all
libapr-util1-debuginfo
libapr1-debuginfo
Code: Select all
make
Code: Select all
make install
Code: Select all
/usr/sbin/suphp -v
Code: Select all
suPHP version 0.6.2
(c) 2002-2005 Sebastian Marsching
suPHP has to be called by mod_suphp to work.
So, nun erstellen wir in /etc eine suphp.conf
Code: Select all
touch /etc/suphp.conf
Code: Select all
[global]
logfile=/var/log/apache2/suphp_log
loglevel=info
webserver_user=wwwrun
docroot=/home/httpd/vhosts
env_path=/bin:/usr/bin
umask=0030
min_uid=500
min_gid=500
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Path to chroot() to before executing script
;chroot=/mychroot
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
[handlers]
;Handler for php-scripts
x-httpd-php=php:/opt/php5.2.1-fastcgi/bin/php
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
Code: Select all
touch /etc/apache2/conf.d/suphp.conf
Code: Select all
suPHP_Engine off
folgenden Eintrage bearbeiten.( könnte bei euch auch anders aussehen )
Code: Select all
APACHE_MODULES="rewrite access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php4 perl python suexec"
Code: Select all
APACHE_MODULES="rewrite access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php4 perl python suexec suphp"
Code: Select all
/home/httpd/vhosts/<domain.de>/conf
Code: Select all
touch /home/httpd/vhosts/<domain.de>/conf/vhost.conf
Code: Select all
<Directory /home/httpd/vhosts/<domain.de>/httpdocs>
# zum ausschalten von mod_php
php_admin_flag engine off
#
suPHP_Engine On
#hier bitte nur den pfad zu php.ini
suPHP_ConfigPath "/etc/phpvirtual/domain"
AddHandler x-httpd-php .php
suPHP_AddHandler x-httpd-php
</Directory>
Code: Select all
Jetzt erstellen wir noch die für den vhost eigene php.ini:
Code: Select all
/etc/phpvirtual/<domain>
Code: Select all
/etc/phpvirtual/<domain>/php.ini
Code: Select all
suPHP_ConfigPath "/etc/phpvirtual/domain"
So, wir sind eigentlich fast fertig, wir müssen Plesk jetzt nur noch dazu bringen die vhost.conf auch zu laden.
Code: Select all
/usr/local/psa/admin/sbin/websrvmng -v -a
Ich hoffe ich habe nichts wichtiges vergessen, und die Admins hier zerreisen mich nicht in der Luft wenn ich hier vielleicht was falsches erklährt hätte.
Das HOWTO für Confixx kommt noch.
Meine gross und KLEIN Schreibungsfehler mögen mir doch verziehen werden.
Gruss
Twisterchen