summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2009-12-09 12:14:06 +0000
committerAntony Dovgal <tony2001@php.net>2009-12-09 12:14:06 +0000
commit4a1715b41f1a420d02aed2b1beaab8afc5440dfd (patch)
tree031122c9b0790e8080f0f5834f67bdf7590a3961
parent409fd5479fc8a9d464259e13384e63720aa9f6f3 (diff)
downloadphp-git-4a1715b41f1a420d02aed2b1beaab8afc5440dfd.tar.gz
add missing variables
use "php-fpm" as binary name delete nginx config example
-rw-r--r--sapi/fpm/conf/init.d.php-fpm.in14
-rw-r--r--sapi/fpm/conf/nginx-site-conf.sample.in46
-rw-r--r--sapi/fpm/config.m410
3 files changed, 16 insertions, 54 deletions
diff --git a/sapi/fpm/conf/init.d.php-fpm.in b/sapi/fpm/conf/init.d.php-fpm.in
index 5dd11c9f85..a0175eeebc 100644
--- a/sapi/fpm/conf/init.d.php-fpm.in
+++ b/sapi/fpm/conf/init.d.php-fpm.in
@@ -1,12 +1,12 @@
#! /bin/sh
### BEGIN INIT INFO
-# Provides: @php_fpm_bin@
+# Provides: php-fpm
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: starts @php_fpm_bin@
+# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
### END INIT INFO
@@ -49,7 +49,7 @@ wait_for_pid () {
case "$1" in
start)
- echo -n "Starting @php_fpm_bin@ "
+ echo -n "Starting php-fpm "
$php_fpm_BIN $php_opts
@@ -69,7 +69,7 @@ case "$1" in
;;
stop)
- echo -n "Gracefully shutting down @php_fpm_bin@ "
+ echo -n "Gracefully shutting down php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
@@ -89,7 +89,7 @@ case "$1" in
;;
force-quit)
- echo -n "Terminating @php_fpm_bin@ "
+ echo -n "Terminating php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
@@ -115,10 +115,10 @@ case "$1" in
reload)
- echo -n "Reload service @php_fpm_bin@ "
+ echo -n "Reload service php-fpm "
if [ ! -r $php_fpm_PID ] ; then
- echo "warning, no pid file found - @php_fpm_bin@ is not running ?"
+ echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
diff --git a/sapi/fpm/conf/nginx-site-conf.sample.in b/sapi/fpm/conf/nginx-site-conf.sample.in
deleted file mode 100644
index 6791d9f7f1..0000000000
--- a/sapi/fpm/conf/nginx-site-conf.sample.in
+++ /dev/null
@@ -1,46 +0,0 @@
-# @php_fpm_bin@ - PHP FastCGI Process Manager 'PHP-FPM'
-#
-# nginx-site-conf.sample:
-# Php Site configuration for nginx webserver
-#
-# 1. set $site_root /path/to/your/website;
-# 2. Rename this file. Copy it to /etc/nginx/sites-available, /etc/nginx/sites-enabled
-# 3. Restart nginx webserver, and @php_fpm_bin@ service.
-#
-
-server {
-
- set $site_root /var/www/nginx-site;
- server_name localhost;
- listen 80;
-
- access_log /var/log/nginx/localhost.access.log;
-
- location / {
- root $site_root;
- index index.html index.htm;
- }
-
- #error_page 404 /404.html;
-
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /var/www/nginx-default;
- }
-
- # pass the *.php scripts to @php_fpm_bin@ listening on port 9000
- #
- location ~ \.php$ {
-
- root $site_root;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
-
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param SERVER_NAME $http_host;
- fastcgi_ignore_client_abort on;
- }
-}
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index dffc5c6ec7..06c00fafd6 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -537,6 +537,13 @@ AC_DEFUN([AC_FPM_VARS],
if test -z "$prefix" -o "$prefix" = "NONE"; then
prefix="/usr/local"
fi
+
+ if test -z "$exec_prefix" -o "$exec_prefix" = "NONE"; then
+ exec_prefix="/usr/local"
+ fi
+
+ php_fpm_bin_path=`eval echo "$bindir"`
+ php_fpm_bin_path="$php_fpm_bin_path/php-fpm"
if test -z "$php_fpm_conf_path"; then
php_fpm_conf_path=`eval echo "$sysconfdir"`
@@ -580,6 +587,8 @@ AC_DEFUN([AC_FPM_VARS],
PHP_SUBST_OLD(fpm_version)
PHP_SUBST_OLD(php_fpm_conf_dir)
+ PHP_SUBST_OLD(php_fpm_conf_path)
+ PHP_SUBST_OLD(php_fpm_bin_path)
PHP_SUBST_OLD(php_fpm_log_path)
PHP_SUBST_OLD(php_fpm_pid_path)
PHP_SUBST_OLD(php_fpm_log_dir)
@@ -602,7 +611,6 @@ AC_DEFUN([AC_FPM_OUTPUT],
[
PHP_OUTPUT(sapi/fpm/conf/php-fpm.conf:sapi/fpm/conf/php-fpm.conf.in)
PHP_OUTPUT(sapi/fpm/conf/init.d.php-fpm:sapi/fpm/conf/init.d.php-fpm.in)
- PHP_OUTPUT(sapi/fpm/conf/nginx-site-conf.sample:sapi/fpm/conf/nginx-site-conf.sample.in)
PHP_OUTPUT(sapi/fpm/php-fpm.1:sapi/fpm/man/php-fpm.1.in)
])