Need to restart apache

Hi,

I want to restart apache using ssh. How can I get the apache path (can i get it from php.ini) and what are the things I need to do in order to restart apache.

Do I need to go to apache/bin and run the command?

Apache controls PHP not the other way around, to restart Apache simply do the following…

  1. Open Putty or your SSH software
  2. Log into your server using your server IP address and SSH login details
  3. Type the following command into the terminal window and hit enter

    > /etc/init.d/httpd restart

It depends on the platform, but on most servers the command SgtLegend provided will work

On others (e.g. debian) you might need


/etc/init.d/apache2 restart

or


apachectl restart

And instead of “restart” you can also use “graceful”, which also restarts Apache without actually shutting it down, but just reloading the config, so you don’t have any downtime.

if it’s apache2, Scallio, it’ll actually probably be ‘apache2ctl restart’

Oddly, I’ve also seen servers with apachectl for Apache 2, but yeah, most servers probably have apache2ctl :slight_smile:

Thanks all