Ich habe es jetzt mal unter Buster ausprobiert. Out-of-the-box. Adminer habe ich über aptitude installiert und keine weitere Änderungen vorgenommen.
In /etc/nginx/sites-available habe ich die "default" nach "adminer" copiert und den symlink von "default" in /etc/nginx/sites-enabled gelöscht! Weitere vhosts sind nicht vorhanden.
Hier die funktionierende Konfig.
Code: Alles auswählen
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
location /adminer {
root /usr/share/adminer/;
index index.php;
location ~ \.php$ {
try_files $uri =404;
root /usr/share/adminer/;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_param HTTPS off;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
root /usr/share/adminer/;
access_log off;
}
}
Die PHP7.3 Einstellungen
Code: Alles auswählen
rgrep php7.3 /etc/php/7.3/
/etc/php/7.3/fpm/php-fpm.conf:pid = /run/php/php7.3-fpm.pid
/etc/php/7.3/fpm/php-fpm.conf:error_log = /var/log/php7.3-fpm.log
/etc/php/7.3/fpm/pool.d/www.conf:listen = /run/php/php7.3-fpm.sock
Zum Testen kannst Du in /usr/share/adminer/adminer/ eine datei namens info.php anlegen. Deren Inhalt ist:
Die müsste dann unter
http://localhost/adminer/info.php funktionieren. Ansonsten verschiebe sie eine Ebene höher und versuche es erneut.