Hi zusammen,
Ich möchte auf meinem Ubuntuserver (aktuellste Version) Apache2 mit suPHP einrichten.
Diese Schritte habe ich schon gemacht:
1 2 3 | aptitude install suphp-common libapache2-mod-suphp a2enmod suphp /etc/init.d/apache2 restart |
Danach habe ich den VirtualHost angepasst:
<VirtualHost *:80 ServerAdmin webmaster@localhost ServerName test.domain.local DocumentRoot /var/www/test.domain.local <Directory / Options FollowSymLinks AllowOverride None </Directory <Directory /var/www/ Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin" AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/" Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory suPHP_Engine on suPHP_UserGroup www-data www-data AddHandler x-httpd-php .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php </VirtualHost
Ich möchte suPHP erstmals unter www-data laufen lassen. Ich denke den Benutzer später zu ändern dürfte das kleinste Problem sein.
Wenn ich jetzt aber den Apache2 neustarten will, bekomme ich diesen Fehler:
Syntax error on line 42 of /etc/apache2/sites-enabled/test.domain.local: Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. ...fail!
Warum kennt Apache2 diese Konfiguration nicht? Diese gehört doch zu suPHP. http://www.suphp.org/DocumentationView.html?file=apache/CONFIG
Im Apache2 Error Log steht:
[Mon Aug 27 21:40:11 2012] [error] [client 192.168.0.11] SoftException in Application.cpp:350: UID of script "/var/www/test.domain.local/index.php" is smaller than min_uid [Mon Aug 27 21:40:11 2012] [error] [client 192.168.0.11] Premature end of script headers: index.php [Mon Aug 27 21:40:11 2012] [error] [client 192.168.0.11] SoftException in Application.cpp:350: UID of script "/var/www/test.domain.local/index.php" is smaller than min_uid [Mon Aug 27 21:40:11 2012] [error] [client 192.168.0.11] Premature end of script headers: index.php
www-data hat die UID und GID 33. Laut Konfiguration muss die UID und GID mindestens 10 sein, was in diesem Fall stimmt. Darum versteh ich den Fehler von Apache2 nicht?
Dies ist meine /etc/suphp/suphp.conf:
[global] ;Path to logfile logfile=/var/log/suphp/suphp.log ;Loglevel loglevel=info ;User Apache is running as webserver_user=www-data ;Path all scripts have to be in docroot=/var/www:${HOME}/public_html ;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=false ;PATH environment variable env_path=/bin:/usr/bin ;Umask to set, specify in octal notation umask=0077 ; Minimum UID min_uid=10 ; Minimum GID min_gid=10 [handlers] ;Handler for php-scripts application/x-httpd-suphp="php:/usr/bin/php-cgi" ;Handler for CGI-scripts x-suphp-cgi="execute:!self"
Wie bekomme ich suPHP zum Laufen? Wäre cool wenn mir jemand helfen kann, dass suPHP nachher auf dem Server läuft.
Gruss Power