![]() |
|
Guide Check Nginx, PHP-FPM and MySQL Services in aaPanel via SSH - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: aaPanel (https://adminsforum.com/Forum-aapanel) +---- Forum: aaPanel Guides & Tutorials (https://adminsforum.com/Forum-aapanel-guides-tutorials) +----- Forum: aaPanel Websites & Web Servers Guides (https://adminsforum.com/Forum-aapanel-websites-web-servers-guides) +----- Thread: Guide Check Nginx, PHP-FPM and MySQL Services in aaPanel via SSH (/Thread-guide-check-nginx-php-fpm-and-mysql-services-in-aapanel-via-ssh) |
Check Nginx, PHP-FPM and MySQL Services in aaPanel via SSH - DEV - 10-14-2026 When a website fails, check the service that handles the failing request. aaPanel-installed Nginx, PHP-FPM and database services can have different names and paths from distribution packages. Inspect the installed service before copying a generic command. Tested lab: Ubuntu 22.04.5 and aaPanel Free 8.0.7. We checked Nginx, MariaDB under the mysqld service name, and PHP-FPM 8.4/8.5. Nginx and both PHP-FPM configuration tests passed. This lesson tested diagnostic commands without restarting those services. Formatted transcript summarizing actual status and configuration-test results from our lab. 1. Know which component you are checking
2. Find the installed service names From an authorized SSH administrator session: Code: ls /etc/init.d/nginx /etc/init.d/mysqld /etc/init.d/php-fpm-*3. Check Nginx and validate configuration Code: /etc/init.d/nginx status
/www/server/nginx/sbin/nginx -tA syntax test does not prove the site serves the right content. After a configuration change, check a real HTTP/HTTPS request as well. If validation fails, correct the reported file and line before reloading. Keep a backup of the changed configuration. Reload versus restart For a reviewed Nginx configuration change, a reload asks the running server to load the new configuration. A restart stops and starts the service and can interrupt requests. The installed init script supports service controls, but this guide did not execute a reload or restart: Code: /etc/init.d/nginx reload
/etc/init.d/nginx restart4. Check the website's PHP-FPM version Confirm the PHP version selected for the website in aaPanel. Our lab has two separate services: Code: /etc/init.d/php-fpm-84 status
/etc/init.d/php-fpm-85 statusCode: /www/server/php/84/sbin/php-fpm -t
/www/server/php/85/sbin/php-fpm -tIf maintenance genuinely requires restarting the website's PHP-FPM service, its installed service script provides the restart action. For example: Code: /etc/init.d/php-fpm-85 restartThe shell's php --version can identify a CLI default rather than the PHP-FPM version handling a specific website. Do not use it as the only evidence of the site's runtime. 5. Check MySQL or MariaDB Code: /etc/init.d/mysqld statusA database restart can interrupt applications and active connections. Do not restart it as the first response to an authentication or missing-table error. Confirm the actual failure and plan maintenance before using a control action such as: Code: /etc/init.d/mysqld restart6. Verify the website beyond status A running process is one signal, not the whole result. Check:
Common mistakes
What our lab verified Nginx was running and passed its configuration test. MariaDB's mysqld service was active. Both PHP-FPM 8.4 and 8.5 were running and passed configuration tests. Service restart examples were explained, not executed or claimed as tested. AdminsForum CLI series. The image is a formatted lab-result transcript; use the service names and paths actually installed on your own server. |