How do I verify that the Apache web server is running and working properly?

Refers to:

  • Plesk

Created:

2016-11-16 12:53:22 UTC

Modified:

2017-02-24 13:06:58 UTC

8

Was this article helpful?


Have more questions?

Submit a request

How do I verify that the Apache web server is running and working properly?

Resolution

Note: The name of Apache 2 binary on Debian and SuSE OSes is "apache2," not "httpd" as it is on Red Hat-based Linux distributions or FreeBSD.

Make sure that "httpd" ("apache2" on SUsE and Debian) processes are shown in "ps" output:

# ps ax | grep httpd | grep -v grep

If not, try to start Apache from Plesk CP or via command line. If you get an error, check / var/log/httpd/error\_log ( /var/log/apache2/error\_log on SuSE and Debian, /usr/local/psa/apache/logs/error\_log on FreeBSD) for a detailed error description and read this article about Apache errors: 1488 .

If no error appears, and Apache does not start silently, check that the /var/log/httpd/error\_log (the path may differ for different operating systems) contains less than 2GB.

Make sure that Apache is listening on the both HTTP and HTTPS ports (80/443) on all needed IP addresses:

# netstat -l | grep http
tcp 0 0 *:http *:* LISTEN
tcp 0 0 *:https *:* LISTEN

or

# /usr/sbin/lsof -i | grep -i httpd
httpd 22591 root 3u IPv6 2982023 TCP *:http (LISTEN)
httpd 22591 root 4u IPv6 2982024 TCP *:https (LISTEN)

Note: "\*:http" means that the HTTP port is listened to on all IP addresses. If you see "192.168.1.1:http" instead, it means that only connections to the "192.168.1.1" IP address are accepted by Apache.

  • To check that the Apache server is responsive, try to open a page from the server itself using "curl" or a console browser (e.g, Lynx, Links) .
    # curl domain.tld
Have more questions? Submit a request
Please sign in to leave a comment.