What is the difference between the apache service Reload and Restart?

Asked

Viewed 1,627 times

3

What is the difference of both and which cases to use any of them?

service apache2 restart and service apache2 reload

1 answer

5


The reload tells the service to reload your configuration files. This means it should be sufficient to reload the configuration.

However, there may be certain services that do not follow this rule, or that will not reload configuration files.

I removed the section above from here.

As a complement, I believe reload works for cases such as adding new websites (through Virtualhost) to Apache. The reload will cause the settings to be "reloaded", causing the new site added to be recognized.

On the other hand, when you enable/disable an extension for example, it is needed to restart the server.

In a coarse manner, summary as follows: The restart to and start the server again. Already the reload just reload the settings. This sounds like the difference between restarting the computer and just reloading and logging in again.

Note that there is a difference between one and the other regarding the speed of execution: O reload is always executed faster than restart, since the operation of this is simpler.

In this last example, the reload is useful to avoid a momentary loss of connection between your server and the client that is currently doing some operation on your system, as the speed with which the reload is almost imperceptible, while the restart takes a little longer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.