banner



1. What Is The Service Called That Runs The Apache Web Server On Linux?

Apache is a world's nearly popular, cantankerous platform HTTP spider web server that is commonly used in Linux and Unix platforms to deploy and run web applications or websites. Chiefly, information technology's piece of cake to install and has a simple configuration likewise.

Read Likewise: How to Hide Apache Version Number and Other Sensitive Info

In this article, we will show how to check Apache web server uptime on a Linux system using unlike methods/commands explained below.

1. Systemctl Utility

Systemctl is a utility for controlling the systemd system and service manager; it is used it to start, restart, finish services and beyond. The systemctl condition sub-command, as the name states is used to view the status of a service, you tin employ it for the above purpose like and then:

$ sudo systemctl status apache2	  #Debian/Ubuntu  # systemctl status httpd	  #RHEL/CentOS/Fedora                
Check Apache Status Using Systemctl
Check Apache Condition Using Systemctl

2. Apachectl Utilities

Apachectl is a control interface for Apache HTTP server. This method requires the mod_status (which displays info near the server is performing including its uptime) module installed and enabled (which is the default setting).

On Debian/Ubuntu

The server-status component is enabled by default using the file /etc/apache2/mods-enabled/status.conf.

$ sudo half-dozen /etc/apache2/mods-enabled/status.conf                
Apache Mod_Status Configuration
Apache Mod_Status Configuration

On RHEL/CentOS

To enable server-status component, create a file below.

# vi /etc/httpd/conf.d/server-condition.conf                

and add together the following configuration.

<Location "/server-status">     SetHandler server-status     #Require  host  localhost		#uncomment to only allow requests from localhost  </Location>                

Save the file and close information technology. Then restart the web server.

# systemctl restart httpd                

If you are primarily using a terminal, then y'all also need a control line web browser such every bit lynx or links.

$ sudo apt install lynx		#Debian/Ubuntu # yum install links		#RHEL/CentOS                

Then run the control below to bank check the Apache service uptime:

$ apachectl status                
Check Apache Status Using Apache2ctl
Check Apache Condition Using Apache2ctl

Alternatively, use the URL beneath to view the Apache spider web server condition information from a graphical web browser:

http://localhost/server-condition OR http:SERVER_IP/server-status                

3. ps Utility

ps is a utility which shows information concerning a selection of the active processes running on a Linux system, you can utilize it with grep control to bank check Apache service uptime every bit follows.

Here, the flag:

  • -e – enables selection of every processes on the arrangement.
  • -o – is used to specify output (comm – command, etime – process execution time and user – process owner).
# ps -eo comm,etime,user | grep apache2 # ps -eo comm,etime,user | grep root | grep apache2 OR # ps -eo comm,etime,user | grep httpd # ps -eo comm,etime,user | grep root | grep httpd                

The sample output below shows that apache2 service has been running for 4 hours, ten minutes and 28 seconds (only consider the one started by root).

Check Apache Uptime
Check Apache Uptime

Lastly, check out more useful Apache web server guides:

  1. 13 Apache Spider web Server Security and Hardening Tips
  2. How to Bank check Which Apache Modules are Enabled/Loaded in Linux
  3. five Tips to Boost the Performance of Your Apache Spider web Server
  4. How to Password Protect Web Directories in Apache Using .htaccess File

In this article, we showed y'all three different ways to cheque Apache/HTTPD service uptime on a Linux system. If you have whatever questions or thoughts to share, practise that via the comment section beneath.

If You Capeesh What We Do Here On TecMint, Y'all Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published manufactures available FREELY to all.

If yous like what you are reading, delight consider buying united states a coffee ( or 2 ) equally a token of appreciation.

Support Us

We are thankful for your never catastrophe support.

Source: https://www.tecmint.com/check-apache-httpd-status-and-uptime-in-linux/

Posted by: sanchezinviand92.blogspot.com

0 Response to "1. What Is The Service Called That Runs The Apache Web Server On Linux?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel