UnixでApacheサービスを再起動するには?

UNIXでApacheサービスを再起動するにはどうすればよいですか?

多くの場合、サーバー管理者として、Apache Httpサービスを再起動するには、サーバーにTelnetまたはSSHで接続する必要があります。 通常、Apache HTTPサービスは次の場所にあります。

1)init.d起動スクリプトフォルダー。

「./apache restart」を発行して再起動します

debian:/etc/init.d# ./apache restart
Forcing reload of web server (apache)... waiting .
debian:/etc/init.d#

2)usr / local / apache / bin

「./apachectl restart」を発行して再起動します

debian:/usr/local/apache/bin# ./apachectl restart
Forcing reload of web server (apache)... waiting .

P.S Your may need sudo privileged to restart the Apache services, and the Apache service name (apache2, apachectl) may vary in server

Apacheインストールフォルダーはどこにありますか?

Apacheのインストールフォルダがどこにあるか覚えていないのはどうですか? 次のコマンドを発行して確認してください。

find . -name apache