Kā restartēt Apache?

Es pārgāju no SLES uz Ubuntu, un tagad es gribu restartēt savu vietējo serveri. SLES es izmantoju :

rcapache2 restart

bet šķiet, ka Ubuntu tas kaut kā nedarbojas :(.

Kā restartēt Apache?

Risinājums

sudo service apache2 restart par to, kā tas ir aizgūts no Red Hat.

Komentāri (4)
sudo /etc/init.d/apache2 restart

Protams, jūs varat nomainīt restart uz stop, start un (es domāju) reload.

Komentāri (3)

ja esat saknes lietotājs: (In Ubuntu root ir atspējots, Es domāju, ka, nekā izmantot 'sudo' komanda!))

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

(Ja izmantojāt a2ensite vai a2dissite, jums jāpārlādē apache konfigurācija)

Komentāri (6)