Browse Source

Fix Nginx PHP5-FPM Reload After New Settings

old-stable
Mitesh Shah 12 years ago
parent
commit
2ef4fbffca
  1. 31
      setup/engine

31
setup/engine

@ -121,7 +121,7 @@ COMMONNGINX()
# Update Nginx Common Files
cp -v /usr/share/easyengine/nginx/common/* /etc/nginx/common/ \
|| OwnError "Unable To Copy Nginx Common Files"
|| OwnError "Unable To Copy Nginx Common Files"
}
@ -134,6 +134,12 @@ INSTALLPHP()
php5-dev php5-imap php5-mcrypt || OwnError "Unable To Install PHP5"
}
CHANGEPHPSOCKET()
{
# Change PHP Fastcgi Socket
sed -i.bak "s'listen = /var/run/php5-fpm.sock'listen = 127.0.0.1:9000'" /etc/php5/fpm/pool.d/www.conf
}
INSTALLMYSQL()
{
# Install MySQL
@ -372,6 +378,13 @@ NGINXRELOAD()
nginx -t && service nginx reload || OwnError "Unable To Reload Nginx"
}
PHPRELOAD()
{
# Reload PHP
echo -e "\033[34m Reloading PHP5-FPM Configuration, Please Wait... \e[0m"
service php5-fpm reload || OwnError "Unable To Reload PHP5-FPM"
}
PHPSTART()
{
# Check PHP5-FPM IS Running
@ -414,6 +427,9 @@ then
# Personal Settings For Nginx
COMMONNGINX
# Reload Nginx To Take Effect Of COMMONNGINX Functions
NGINXRELOAD
# Display Success Message
echo -e "\033[34m Nginx Successfully Installed \e[0m"
@ -437,7 +453,10 @@ then
INSTALLPHP
# Change PHP Fastcgi Socket
sed -i.bak "s'listen = /var/run/php5-fpm.sock'listen = 127.0.0.1:9000'" /etc/php5/fpm/pool.d/www.conf
CHANGEPHPSOCKET
## Reload PHP To Take Effect Of CHANGEPHPSOCKET Functions
PHPRELOAD
# Install WP-CLI
WP-CLI
@ -505,8 +524,14 @@ then
# Personal Settings For Nginx
COMMONNGINX
# Reload Nginx To Take Effect Of COMMONNGINX Functions
NGINXRELOAD
# Change PHP Fastcgi Socket
sed -i.bak "s'listen = /var/run/php5-fpm.sock'listen = 127.0.0.1:9000'" /etc/php5/fpm/pool.d/www.conf
CHANGEPHPSOCKET
## Reload PHP To Take Effect Of CHANGEPHPSOCKET Functions
PHPRELOAD
# Install WP-CLI
WP-CLI

Loading…
Cancel
Save