installing 4get on Nginx + Debian 12 modifications #65
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I had to do following modifications, following the Nginx doc (Docs/Nginx.md).
Modify example.com.conf
certbot package for nginx
apt install python3-certbot-nginx
For php-fpm to work, gave me 502 Gateway error otherwise
SCRATCH THIS, CHECK BELOW! EDIT SECTION
sudo mkdir /var/run/php-fpm/
nano /etc/php/8.2/fpm/pool.d/www.conf
Add this
listen = /var/run/php-fpm/php-fpm.sock
Restart the service, change version number if yours differs
systemctl restart php8.2-fpm
I also did NOT set up the Nginx config for 4get in /etc/nginx/conf.d. I don't see why I would.
On Debian, it is /etc/nginx/sites-enabled/example.com.conf. For example: search.todiloo.com.conf. Doesn't really matter what you call it. Goes after server_name anyway inside the conf. Just make sure the file ends with .conf.
You can do the ln -s between sites-available and sites-enabled but I skip that stupid step.
EDIT
For php-fpm to work
The PHP-FPM stuff does not survive a reboot on my VPS. I should also add that I run an iRedMail server on it. Don't know how that affects anything. Makes it harder to deal with PHP-FPM for sure. Since there is already something configured for it.
New version:
No making directories!
nano /etc/php/8.2/fpm/pool.d/www.conf
Add this
listen = /run/php/php8.2-fpm.sock
Also, update Nginx
nano /etc/nginx/sites-enabled/<4get.conf>
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
Instead of /var/run/ directory, just using /run/ makes it survive a reboot. Don't ask me why.
I should also add that I added a PHP-FPM pool
/etc/php/8.2/fpm/pool.d/4get_pool.conf
/etc/php/8.2/fpm/pool.d/www.conf already had something and I think it was conflicting. I copied what was in there to 4get_pool.conf and removed the "listen = 127.0.0.1...." stuff. I also want to keep iRedMail and 4get separate, in case either one updates. I don't want both to fail.
Including copying this:
pm.status_path = /status
Log was showing errors otherwise. Could not get status ... Json...something.
systemctl restart nginx
Restart the FPM service, change version number if yours differs
systemctl restart php8.2-fpm
I spent a couple of hours on this, in the process editing the wrong nginx virtualhost file, in sites-available instead of sites-enabled...that was fun...
It's funny cause when I followed the guide for nginx I was getting similar errors but only 1/3 of the time on debian. Don't know what caused it, I'll look into it when im not burnt out.
Thanks bro