Now it's works for a few days ago. I have destroyed and then beginning again.
sudo rm -f /var/lib/dpkg/info/mysql-server-8.0.prerm
sudo dpkg --force-all -P mysql-server-8.0
sudo apt remove mysql-server mysql-client mariadb-server mariadb-client apache phpmyadmin
sudo apt auroremove mysql-server mysql-client mariadb-server mariadb-client apache phpmyadmin
sudo apt purge mysql-server mysql-client mariadb-server mariadb-client apache phpmyadmin
And now beginning from scratch again:
sudo apt update
sudo apt upgrade
sudo apt install mariadb-server
systemctl status nginx <- running now
systemctl status mariadb <- running now, finally
(see the LEMP)
/var/www/html: sudo chown -R www-data:www-data test
folder - perm - owner/group:
test.com - 755 - www-data/www-data
/var/www/html/test.com/public/.htaccess
RewriteBase /test.com/public
<IfModule mod_rewrite.c>
RewriteEngine on
etc.
/var/www/html/test.com/.nginx.conf
location / {
try_files $uri $uri/ /index.php?$query_string;
}
/var/www/html/test.com/site.php
require __DIR__.'/vendor/autoload.php';
return Flarum\Foundation\Site::fromPaths([
'base' => __DIR__,
'public' => __DIR__.'/public',
'storage' => __DIR__.'/storage',
]);
/var/www/html/test.com/public/index.php
$site = require '../site.php';
/etc/nginx/sites-available/test.com
server {
listen 80;
listen [::]:80;
root /var/www/html/test.com;
index index.php index.html index.htm;
server_name test.com www.test.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/test.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/test.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
/etc/nginx/sites-available/test.com (symbolic links: /etc/nginx/sites-enabled/)
There is running green both on nginx and mariadb. But there is a tiny little thing to fix it. But I dont know.
https://test.com/index.php (http, https and www, no-www, index.php and only test.com, test.com and test.com/public)
404 Not Found
nginx/1.18.0 (Ubuntu)
Edit: info.php is only <?php phpinfo();
line.
Can you help me?