From 868ed225a85500b92365af51fd45f44d353ce54a Mon Sep 17 00:00:00 2001 From: Dai Date: Thu, 9 Oct 2025 19:19:30 -0700 Subject: [PATCH] Add phpmyadmin/phpmyadmin --- phpmyadmin/phpmyadmin | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 phpmyadmin/phpmyadmin diff --git a/phpmyadmin/phpmyadmin b/phpmyadmin/phpmyadmin new file mode 100644 index 0000000..03ced33 --- /dev/null +++ b/phpmyadmin/phpmyadmin @@ -0,0 +1,48 @@ +server { + # Change this to 80 if you want to access it with a subdomain instead + listen 8080 default_server; + listen [::]:8080 default_server; + + root /usr/share/phpmyadmin; + + index index.php index.html index.htm index.nginx-debian.html; + + # If you want it to be accessible on a subdomain, replace _ with your subdomain, and make sure you have a DNS record pointing to your server + server_name _; + + + location / { + try_files $uri $uri/ /index.php?$args; + } + + # pass PHP scripts to FastCGI server + # + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_intercept_errors on; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + fastcgi_pass unix:/run/php/php-fpm.sock; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Permitted-Cross-Domain-Policies none; + add_header X-Frame-Options "SAMEORIGIN"; + } + + # Don't log access to favicon.ico and robots.txt + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Deny access to hidden files + location ~ /\.ht { + deny all; + } +} \ No newline at end of file