apache2 + php5 + fast-cgi + suexec
Üdvözletem!
Szóval Feisty alatt próbálom összehozni a címben lévő kombinációt.
Felraktam a megfelelő csomagokat, modulokat betöltöttem. Azokkal nem lehet bibi véleményem szerint, mert akkor hibát dobna egyes konfigurációs direktívákra.
A fastcgi.conf tartalma:
<IfModule mod_fastcgi.c>
FastCgiIpcDir /var/lib/apache2/fastcgi
FastCgiConfig -pass-header Authorization
FastCgiWrapper /usr/lib/apache2/suexec
AddType application/x-httpd-fastphp .php .php3 .php4 .php5 .phps .phtml
Action application/x-httpd-fastphp /fcgi/php-fcgi
ScriptAlias /cgi/ /var/www/
<Directory "/var/www/">
AllowOverride None
Options +ExecCGI -MultiViews -Indexes
Order allow,deny
Allow from all
</Directory>
<Location /cgi/>
SetHandler fastcgi-script
Options +ExecCGI
</Location>
</IfModule>
Az adott VirtualHost tartalma:
<VirtualHost *>
ServerAdmin admin@localhost
ServerName feketeberek
SuexecUserGroup lacika lacika
DirectoryIndex index.php
DocumentRoot /home/lacika/public_html/feketeberek/web
<Directory /home/lacika/public_html/feketeberek/>
Options FollowSymLinks ExecCGI
AllowOverride All
AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /fcgi/php-fcgi
</Directory>
ScriptAlias /fcgi/ /var/www/feketeberek/
<Location /fcgi/>
Options ExecCGI
SetHandler fastcgi-script
</Location>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
Alias /sf/ "/usr/share/php/data/symfony/web/sf/"
<Directory "/usr/share/php/data/symfony/web/sf/">
Options FollowSymLinks ExecCGI
AllowOverride All
Allow from All
AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /fcgi/php-fcgi
</Directory>
</VirtualHost>
A következő hiba van a /var/log/apache2/error.log -ban:
[Wed May 16 11:49:33 2007] [warn] FastCGI: (dynamic) server "/var/www/feketeberek/php-fcgi" (uid 1000, gid 1000) started (pid 26207)
suexec policy violation: see suexec log for more details
A /var/log/apache2/suexec.log tartalma:
[2007-05-16 11:49:33]: user mismatch (lacika instead of www-data)
A /var/www/feketeberek/php-fcgi tartalma:
#!/bin/bash
PHPRC="."
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /usr/lib/cgi-bin/php5 $*
Hol van a kutya elásva? Értem én a hibaüzenetet a suexec.log -ból, csak nem értem a miértjét :(.
- Tovább (apache2 + php5 + fast-cgi + suexec)
- 2648 megtekintés