Switch to more proper php-cgi configuration
This commit is contained in:
@@ -4,21 +4,15 @@ source /build/config
|
||||
set -x
|
||||
|
||||
## Environment
|
||||
export_env PHP_CGI_PORT 5555
|
||||
export_env PHP_CONFIG /host/etc/php.ini
|
||||
export_env PHP_FCGI_CONFIG /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
|
||||
export_env PHP_FCGI_PORT 5555
|
||||
export_env PHP_FCGI_CHILDREN 16
|
||||
export_env PHP_FCGI_MAX_REQUESTS 2000
|
||||
|
||||
## Enable configuration of PHP in Lighttpd
|
||||
## Configuration
|
||||
ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/
|
||||
cat << EOF > /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
|
||||
fastcgi.server += (
|
||||
".php" => (
|
||||
"localhost" =>(
|
||||
"host" => "127.0.0.1",
|
||||
"port" => $PHP_CGI_PORT
|
||||
)
|
||||
)
|
||||
)
|
||||
EOF
|
||||
|
||||
## Workaround for PHP socket
|
||||
# sed -i "s,\(\"socket\"\s*=>\s*\"\).*$,\1/tmp/php.socket\"\,," /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
|
||||
cp /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/
|
||||
sed -i "s,\(\"PHP_FCGI_CHILDREN\"\s*=>\s*\"\).*$,\1$PHP_FCGI_CHILDREN\"\,," $PHP_FCGI_CONFIG
|
||||
sed -i "s,\(\"PHP_FCGI_MAX_REQUESTS\"\s*=>\s*\"\).*$,\1$PHP_FCGI_MAX_REQUESTS\"\,," $PHP_FCGI_CONFIG
|
||||
sed -i "s,\(\"socket\"\),\"host\" => \"127.0.0.1\"\,\n\t\t\"port\" => $PHP_FCGI_PORT\,\n\t\t#\1," $PHP_FCGI_CONFIG
|
||||
Reference in New Issue
Block a user