Hello!
I recently installed 64 bit Bullseye to Pi4 4GB model without GUI. I am trying to setup some websites (for example nextcloud), and installed NGINX with PHP 8.1. I modified a bit the PHP config based on nextcloud install description, so maybe I can give a try with default config, but should not be the problem here I think.
PHP works fine with this config:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
But the php files are only downloaded with this config:
upstream php-handler {
server unix:/var/run/php/php8.1-fpm.sock;
}
At first I tried the default available 7.4 PHP version, but got the same result.
I also checked different descriptions, but I couldn't figure out what the problem is with.
For now I am trying this with very simple server blocks to make the above work.
server {
listen 80;
listen [::]:80;
root /var/www;
index index.php index.html index.htm;
server_name example.com;
}
The config with upstream would be better with more server blocks I think, I would like figure out how to make it work. Any suggestions would be much appreciated.