Hey everyone,
I’m having a recurring issue with my Raspberry Pi web server, and I’d appreciate any help troubleshooting.
Setup Details:
- Hardware: Raspberry Pi
- Control Panel: HestiaCP
- Web Server: Nginx
- PHP Version: 8.2 (PHP-FPM)
- CMS: WordPress
- Local Domain:
pi.local
Issue:
After installing HestiaCP and setting up WordPress, my site (pi.local
) works fine until I reboot. Once I restart the Raspberry Pi, I get a “502 Bad Gateway” error when trying to access the site.
The only way I’ve been able to fix it is by deleting the pi.local
domain in HestiaCP, recreating it, and reinstalling WordPress. However, this only works until the next reboot.
What I’ve Checked:
PHP-FPM service (
php8.2-fpm.service
) is running after reboot.
Assigned a static IP to the Raspberry Pi and mapped
pi.local
to it in /etc/hosts
to ensure consistent name resolution.
Checked Nginx and PHP-FPM logs for errors.
Discovered that Apache2 is not restarting properly after a reboot.
Looking for Help With:
- Why does this “502 Bad Gateway” error keep happening after reboot?
- How can I ensure Apache2 starts automatically on reboot?
- Any better ways to keep the setup stable without needing to delete/recreate the domain each time?
Bonus Question:
Which server control panel do you recommend for local WordPress installations? I’m using HestiaCP, but I’d love to hear if anyone has better alternatives for Raspberry Pi setups.
Thanks in advance!