Restart Apache after PHP update?

7,725

You do not need to restart apache, but you need to tell it to reload its configuration. I am not sure which command centos uses to start/stop/reload daemons.

On centos the command should be:

sudo service httpd graceful

On a linux that uses systemd the command would be:

sudo systemctl reload apache2

On debian it would be:

sudo apache2ctl graceful
Share:
7,725

Related videos on Youtube

SPRBRN
Author by

SPRBRN

Updated on September 18, 2022

Comments

  • SPRBRN
    SPRBRN almost 2 years

    One of our Amazon Linux servers has php56 installed, which is not the default PHP installation. Quite often I see updates for this package, while on other server PHP is not updated.

    Do I need to restart the HTTPD service after updating php56?

    • muru
      muru over 8 years
      Are you using Apache's PHP module, or PHP-FPM?
    • SPRBRN
      SPRBRN over 8 years
      We're using the Apache PHP module.
  • SPRBRN
    SPRBRN over 8 years
    I don't see a reload option. When I try sudo apachectl reload it displays the help info for httpd. In the end I restarted: sudo service httpd graceful.
  • Thawn
    Thawn over 8 years
    thanks SPRBRN, I fixed the command accordingly :). Actually, graceful on centos should do exactly the same thing as reload on other distros