first commit

This commit is contained in:
phil 2024-01-04 07:37:47 +01:00
commit b34f00fbb8
8 changed files with 118 additions and 0 deletions

32
templates/nginx.conf Normal file
View file

@ -0,0 +1,32 @@
server {
listen 80;
server_name {{ phpmyadmin_domain }};
include snippets/letsencrypt.conf;
location / { return 301 https://$http_host$request_uri; }
}
server {
listen 443 ssl http2;
server_name {{ phpmyadmin_domain }};
ssl_certificate /var/lib/dehydrated/certs/{{ phpmyadmin_domain }}/fullchain.pem;
ssl_certificate_key /var/lib/dehydrated/certs/{{ phpmyadmin_domain }}/privkey.pem;
include /etc/nginx/snippets/add_headers.conf;
auth_basic "Restricted Access Only";
auth_basic_user_file {{ phpmyadmin_htpasswd_file }};
root /usr/share/phpmyadmin;
index index.php index.html index.htm;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php/php{{ php_version.stdout }}-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~ \.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
root /usr/share/phpmyadmin;
}
}