{"id":871,"date":"2017-02-21T13:58:16","date_gmt":"2017-02-21T13:58:16","guid":{"rendered":"https:\/\/www.xsofthost.com\/help\/?p=871"},"modified":"2017-08-31T21:54:29","modified_gmt":"2017-08-31T21:54:29","slug":"how-to-restart-apache-on-linux-using-ssh-commands","status":"publish","type":"post","link":"https:\/\/www.xsofthost.com\/help\/how-to-restart-apache-on-linux-using-ssh-commands\/","title":{"rendered":"How to Restart Apache On Linux Using SSH Commands"},"content":{"rendered":"<h2 class=\"headline\">What are the differences between apache2 and httpd Service<\/h2>\n<p>First on this article you may see different service name for the Apache (apache2 and httpd) .Actually httpd and apache2 are the same both refer to Apache service the only difference is that apache2 is the name of the service on Debian\/Ubuntu Linux and httpd is the name of the service on RedHat, CentOS, Fedora Linux OS.<\/p>\n<h2 class=\"headline\">Why you need to Restart Apache Service<\/h2>\n<p>In most cases you only need to restart Apache if you change any Apache <em>.conf<\/em> file , other configurations may need it for any sites can overrides by editing .<i>htaccess<\/i> file .<\/p>\n<h2 class=\"headline\">How To Restart Apache Service under Linux \/ UNIX<\/h2>\n<p>The following examples using the <strong>restart<\/strong> command in case you want to stop the service you can use <strong>stop<\/strong> command and use <strong>start<\/strong> command to start stopped service.<\/p>\n<div class=\"well well-sm  oscitas-bootstrap-container \">You have run these command under <strong>root\/administrator privileges<\/strong> .<\/div>\n<h3>Restart Apache Service On Debian\/Ubuntu Linux<\/h3>\n<div class=\"cmd\">\n<div><span class=\"prompt\">\/etc\/init.d\/apache2 restart<\/span><\/div>\n<div>Or<\/div>\n<div><span class=\"prompt\">sudo \/etc\/init.d\/apache2 restart<\/span><\/div>\n<\/div>\n<h3>Restart Apache on CentOS\/RHEL\/Red Hat Linux version 4.x\/5.x\/6.x<\/h3>\n<div class=\"cmd\">\n<div><span class=\"prompt\"> service httpd start<\/span><\/div>\n<\/div>\n<h3>Restart Apache on CentOS\/RHEL\/Red Hat Linux version 7.x<\/h3>\n<div class=\"cmd\">\n<div><span class=\"prompt\">systemctl restart httpd.service<\/span><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What are the differences between apache2 and httpd Service First on this article you may see different service name for the Apache (apache2 and httpd) .Actually httpd and apache2 are the same both refer to Apache service the only difference is that apache2 is the name of the service on Debian\/Ubuntu Linux and httpd is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":363,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[41],"tags":[32,178,42,50,148,142,74],"_links":{"self":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/871"}],"collection":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/comments?post=871"}],"version-history":[{"count":6,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/871\/revisions"}],"predecessor-version":[{"id":877,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/871\/revisions\/877"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media\/363"}],"wp:attachment":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media?parent=871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/categories?post=871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/tags?post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}