How to verify that the Apache web server is running and working properly?
Note: The name of Apache 2 binary on Debian is "apache2," not "httpd" as it is on Red Hat-based Linux distributions.
1. Make sure that "httpd" ("apache2" on Debian) processes are shown in "ps" output:
# ps ax | grep httpd | grep -v grep
2. If they are not, try to start Apache from Plesk or via command line. If an error is received, check
on Debian) for a detailed error description and search in
Plesk Help Center
. Frequent errors are given below:
#213393589 Unable to open logs; Too many open files; [ ] make\_sock: problem listening on port 443, file descriptor (1068) larger than FD\_SETSIZE (1024) #213922325 (98)Address already in use: make\_sock: could not bind to address [::]:443 #115000066345 PHP Fatal error: [ ] The Loader must appear as the first entry in the php.ini file in Unknown on line 0
3. If no errors appear and Apache silently does not start, make sure that the
(the path may differ for different operating systems) consumes less than 2GB.
4. 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
# /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 "203.0.113.2:http" is shown, it means that only connections to the "203.0.113.2" address are accepted by Apache.
5. 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 example.com