47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
server {
|
|
|
|
# Listen on port 81
|
|
listen 81;
|
|
listen [::]:81;
|
|
|
|
# Server name being used (exact name, wildcards or regular expression)
|
|
server_name eenmaampje;
|
|
|
|
root /var/www/html/adminer;
|
|
|
|
# Logging
|
|
error_log /var/log/nginx/adminer.access_log;
|
|
access_log /var/log/nginx/adminer.error_log;
|
|
|
|
|
|
location / {
|
|
index index.php adminer.php;
|
|
}
|
|
|
|
## Images and static content is treated different
|
|
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
|
|
access_log off;
|
|
expires 360d;
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
location ~ /(libraries|setup/frames|setup/libs) {
|
|
deny all;
|
|
return 404;
|
|
}
|
|
|
|
# Pass the PHP scripts to FastCGI server
|
|
location ~ \.php$ {
|
|
|
|
#fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
|
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
|
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME /var/www/html/adminer$fastcgi_script_name;
|
|
fastcgi_param HTTPS off;
|
|
}
|
|
}
|