how to restart php-fpm and web server?

Ah oke I understand. I already wondered because garbage is like stuff you want to ged rid of, wasted goods, bad goods.
 
Ah oke I understand. I already wondered because garbage is like stuff you want to ged rid of, wasted goods, bad goods.
my business is selling domain names. we cpanel is considered expensive. Of course I want to snatch sales success.
I thank you for your help.
 
Hello,

Whenever you need to restart PHP-FPM and/or web-server it can be done in DirectAdmin at admin level, and as root in a shell console. If you are a regular user of a shared hosting company you will need to contact your hosting company for this.
For applying changes to an ini (or sometimes after updating Drupal/CiviCRM), I change the PHP version back and forth in the user domain.
 
For people interested, when using SSH as root and when I have to restart the services, I have multiple php-fpm versions like most here.
So as root I use a script from @zEitEr which looks like this:

Code:
#!/bin/bash
# PHP-FPM is not restarted after an user import
# so here we restart it
restart_fpm()
{
    echo "[$(date)] Restarting php-fpm${PHP_VER}";
    /bin/systemctl restart "php-fpm${PHP_VER}";
    ps aux | grep -v grep | grep "php-fpm: master process" | grep "${PHP_VER}";
}

for PHP_VER in $(grep ^php[1-4]_release= /usr/local/directadmin/custombuild/options.conf | grep -v =no | cut -d= -f2 | awk -F. '{print $1$2}')
do
{
    restart_fpm;
}
done;

Which will start all php-fpm versions present for you.
Ofcourse you can also add the line to restart httpd to or nGinx or whatever you like.
You can ofcourse give it an easy name like restartfpm.sh or something else of your choice.
 
Back
Top