• Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk
  • Login
  • Register
Upgrade
CloudiBee
  • Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk
No Result
View All Result
  • Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk
No Result
View All Result
CloudiBee
No Result
View All Result
Home Linux

Restart Apache2 Web Server in Ubuntu/Debian/RHEL/CentOS

cloudibee by cloudibee
May 27, 2022
in Linux
0
0
SHARES
518
VIEWS
Share on FacebookShare on Twitter

Apache is a cross-platform and open-source HTTP server loaded with powerful features. This can be extended further using different modules. You could be dealing with Apache on a regular basis if you are a system administrator or developer.

It is mainly utilized to facilitate both dynamic Web pages and static content on the Internet. A lot of Web apps are created based on the Apache environment and features.

Table of Contents

    • You might also like
    • Linux Change Password Command: Change password expiry in Linux
    • Top Open Source Email Servers
  • Start, Stop, Restart/Reload tasks
  • Steps to manage the Apache service
  •  Start/stop/restart Apache on Debian and Ubuntu
  • Start/stop/restart Apache on RHEL/CentOS
  • Start Apache2 Web server

You might also like

Linux Change Password Command: Change password expiry in Linux

April 7, 2021
Email Servers

Top Open Source Email Servers

September 7, 2021

Start, Stop, Restart/Reload tasks

The most common tasks done when using the Apache web server are starting, restarting/reloading, and stopping. However, the commands you can use when managing the Apache service are varied across Linux distributions.

That said, there are basic tools to start or restart Apache using specific methods on the Linux or any Unix-like systems. In a Debian or Ubuntu environment, the Apache service is named Apache2.

Steps to manage the Apache service

Before everything else, you have to be logged in as a root or a user with sudo privileges. Note that both SysVinit script and Systemd service units take arguments such as the following to manage the Apache service.

  • Start – turns on the Apache service
  • Stop – turns off the Apache service
  • Restart – turns off and then turns on the Apache service
  • Reload – restarts the Apache service gracefully. Upon reload, the main Apache service will shut down the child processes, loads the new configuration, and starts new child processes
  • Status – the service status will be displayed

 Start/stop/restart Apache on Debian and Ubuntu

The systemd is a system and service manager intended for the most recent releases of Debian and Ubuntu. You can start the Apache service by executing the command ‘$ sudo systemctl start apache2’.

On the other hand, you can stop the Apache service by executing the command ‘$ sudo systemctl stop apache2’. You may also restart the server processes whenever you need to make changes to the Apache configuration by executing the command ‘$ sudo systemctl restart apache2’.

Start/stop/restart Apache on RHEL/CentOS

Systemd is the system and service manager for the RHEL/CentOS version 7 and 8. Thus, you can start the Apache service by executing the command ‘$ sudo systemctl start httpd’. You can also stop the Apache service by executing the command ‘$ sudo systemctl stop httpd’.

The restart command for restarting the Apache service is executed using the command ‘$ sudo systemctl restart httpd’. However, if you have an earlier system or a CentOS 6 that uses SysV, the following command options can be used for the Apache daemon.

  • $ sudo service httpd start
  • $ sudo service httpd stop
  • $ sudo service httpd restart

Note that you can either use the service or the /etc/init.d/ command for Debian and Ubuntu.

Start Apache2 Web server

Thus, you can restart the Apache2 Web server by using any of the following commands:

  • # /etc/init.d/apache2 restart

or

  • $ sudo /etc/init.d/apache2 restart

or

  • $ sudo service apache2 restart

Stop Apache2 Web server

  • # /etc/init.d/apache2 stop

or

  • $ sudo /etc/init.d/apache2 stop

or

  • $ sudo service apache2 stop

Overall, the process of starting, stopping, and restarting the Apache2 Web server is fairly easy. In fact, you can do this in as fast as 1 minute.

Tags: Apache2CentOSDebianRHELUbuntu
Previous Post

What Makes Linux Computers Different?

Next Post

Safely Check Linux Version Using Some Basic Commands

cloudibee

cloudibee

Related Posts

Linux

Linux Change Password Command: Change password expiry in Linux

by cloudibee
April 7, 2021
Email Servers
Linux

Top Open Source Email Servers

by cloudibee
September 7, 2021
Linux

How to Determine Redhat Versions Command

by cloudibee
May 27, 2022
Linux

How-to Linux List Processes in 3 Simple Commands

by cloudibee
May 27, 2022
Linux

What is Cron Job in Linux?

by cloudibee
May 27, 2022
Next Post

Safely Check Linux Version Using Some Basic Commands

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Premium Content

How to identify whether the machine supports full-virtual guests?

November 2, 2007

Second-Generation Cloud Computing – IaaS Services

May 30, 2022

Carpathia Hosting – Combined Enterprise and Federal Focus | IT Industry Analyst Firm, Neovise

May 31, 2022

Browse by Category

  • Business
  • Cloud
  • Code
  • Entertainment
  • finance
  • Game
  • Health
  • IT
  • Lifestyle
  • Linux
  • Marketing
  • Misc
  • News
  • SEO
  • Services
  • Splunk
  • Sports
  • Tech
  • Technology
  • Tipes
  • Tips
  • Uncategorized

Browse by Tags

algorithm Apache Apache2 AWS Bash bash history Bind Blacklists Buffer C C++ CentOS Cerner chage Cloud Cloud Computing Cloud jobs Cloud Storage Cloud Suite Commands Compliance Cron job Debian Directory DMS DNS Docker Dovecot drop cache Email servers Enteprise Cloud Enterprise External FAT32 Format kernel Linux linux kernel Nirvanix passwd Sendmail SSH SSL Terminal Ubuntu

About CloudiBee

cloudibee logo


CloudiBee is an open-source for people who love technology. Here we will be sharing lots of technical information over the web so that a lot of people visit us and gain some knowledge. We are a completely open to all platform. We assure you that you can easily get any info and updated news about the tech world from us. Let's begin with us!

Hot Topic

A Must-Read Guide to Terraform Certification Exam

by mindmingles
August 2, 2022
0
A Must-Read Guide to Terraform Certification Exam

A comprehensive Terraform certification exam preparation manual with a detailed overview of resources, study materials, and exam tips.  Cloud computing...

Read more

Recent News

Business

Hacks for packing wine glasses so they don’t break

July 21, 2022
Business

5 tips to ensure that your movers are always on time.

July 21, 2022
Tips

Flake ice machine for all who want to grow

July 18, 2022

CloudiBee. © 2021. All Rights Reserved

No Result
View All Result
  • Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk

CloudiBee. © 2021. All Rights Reserved

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In