How do you reactivate Apache?

I switched over from SLES to Ubuntu and also currently I intend to reactivate my neighborhood server. In SLES I made use of:

rcapache2 restart

yet this in some way appears not to operate in Ubuntu.: (

How do i reactivate my Apache?

2019-05-18 21:29:09
Source Share
Answers: 6

As Marius claimed elegant need to be made use of either to reactivate:

sudo apache2ctl graceful


sudo apache2ctl graceful-stop

to stop Apache beautifully.

These commands wait till all ask for website have actually been offered prior to restarting/stopping the internet server to make sure that your customer is do not get half a website.

2019-05-22 20:08:31

Do you intend to reactivate Apache, or do you intend to gracefully reload its arrangement?

Every person was addressing the first inquiry ; you can do the 2nd with

sudo service apache2 reload

Gracefully refilling is a little bit much faster, and also there is no downtime.

There is one caution: if your apache config documents have a mistake (as an example sets up a log documents in a directory site that does not exist), the server might calmly exit without publishing any kind of mistake messages to the console. The majority of various other mistakes are captured by the apache2ctl configtest that service apache2 reload runs prior to doing the real reload with apache2ctl graceful.

2019-05-22 18:04:45
sudo /etc/init.d/apache2 restart

Of training course you can exchange out restart for stop, start and also (I assume) reload

2019-05-21 05:47:27

The advised means under Ubuntu to start/stop services (not simply Apache) is to make use of the start/stop/reload commands (which actually are symbolic web links to the initctl program, component of upstart).

For services that make use of the heritage /etc/init.d manuscripts, the equivalent manuscript will certainly be called with the proper parameters ; for services that make use of the upstart framework, the ideal occasion change will certainly be signified to the upstart daemon using initctl.

So, to start/stop/reload/ reactivate apache on Ubuntu, you can make use of:

sudo start apache2
sudo stop apache2
sudo reload apache2
sudo restart apache2
2019-05-21 05:38:46

if you are origin: (In Ubuntu origin is impaired, I assume, than usage 'sudo' command!)

$ /etc/init.d/apache stop
$ /etc/init.d/apache start
$ /etc/init.d/apache restart
$ /etc/init.d/apache reload 

(If you made use of a2ensite or a2dissite, you need to refill your apache arrangement)

2019-05-21 05:00:08

sudo service apache2 restart for the manner in which is obtained from Red Hat.

2019-05-21 04:01:29