Bei dem versuch meine Confixxinstallation mit suPHP zu versehen trete ich momentan auf der Stelle und hoffe Ihr könnt mir den richten Fingerzeig geben, damit ich mein Problem gelößt bekomme.
Die Scripte der Benutzer werden nämlich einfach nicht mit suPHP ausgeführt sondern laufen weiterhin mit den Rechten des Apache Servers.
Auf dem Server läuft Suse 10.3 mit Confix 3.3.5. Um suPHP verwenden zu können, mußte ich dies erst kompilieren, da für Suse kein passendes RPM mitgeliefert wird. Kompiliert habe ich das aktuelle suphp in der Versin 0.7.1 mit folgendem Befehl.
Code: Select all
./configure --with-min-uid=30 --with-min-gid=30 --with-apache-user=wwwrun --with-php=/svr/www/cgi-bin/php5 --with-logfile=/var/log/apache/suphp.log --with-apxs=/usr/sbin/apxs2 --with-apr=/usr/bin/apr-1-config --prefix=/usr
Das hat alles super geklappt, und auch das make sowie make install liefen super durch. Weiterhin habe ich dann die suphp.conf im etc Verzeichniss abgelegt. Dieses file hat folgenden Inhalt.
Code: Select all
[global]
;Path to logfile
logfile=/var/log/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=wwwrun
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=true
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-php=php:/srv/www/cgi-bin/php5
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
Code: Select all
<Directory "/home/www/web6/html">
Options -FollowSymLinks -SymLinksIfOwnerMatch
<IfModule mod_access.c>
Allow from all
</IfModule>
<IfModule mod_authz_host.c>
Allow from all
</IfModule>
suPHP_engine on
</Directory>
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName nordseewoge.xxx.de
ServerAlias www.nordseewoge.xxx.de web6.c024.cyan.xxx.de
DocumentRoot /home/www/web6/html
SuexecUserGroup web6 web6
ScriptAlias /cgi-bin/ /home/www/web6/html/cgi-bin/
suPHP_ConfigPath /etc/apache2/confixx_phpini/web6
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:443>
ServerName web6.xxx.de
DocumentRoot /home/www/web6/html
SuexecUserGroup web6 web6
ScriptAlias /cgi-bin/ /home/www/web6/html/cgi-bin/
suPHP_ConfigPath /etc/apache2/confixx_phpini/web6
<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateKeyFile /etc/apache2/ssl.key/admin.key
SSLCertificateFile /etc/apache2/ssl.crt/admin.crt
SetEnvIf User-Agent ".*MSIE.*"
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
<Files ~ ".(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/home/www/web6/html/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
</IfModule>
</VirtualHost>
Wie gesagt, währe nett wenn jemand einen Tipp hätte.
Gruß,
Markus