mirror of
https://github.com/linuxserver/docker-phpmyadmin.git
synced 2026-02-20 08:40:43 +08:00
Merge pull request #13 from linuxserver/improvements-sb
Update default site-conf sample
This commit is contained in:
commit
74c9709ae5
@ -1,28 +0,0 @@
|
||||
#config-v1
|
||||
server {
|
||||
listen 80 default_server;
|
||||
|
||||
server_name _;
|
||||
root /app/www/public;
|
||||
index index.php;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# set expiration of assets to MAX for caching
|
||||
location ~* \.(ico|css|js)(\?[0-9]+)?$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
location ~* \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
40
root/defaults/nginx/site-confs/default.conf.sample
Normal file
40
root/defaults/nginx/site-confs/default.conf.sample
Normal file
@ -0,0 +1,40 @@
|
||||
## Version 2022/08/20 - Changelog: https://github.com/linuxserver/docker-phpmyadmin/commits/main/root/defaults/nginx/site-confs/default.conf.sample
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name _;
|
||||
|
||||
root /app/www/public;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
location / {
|
||||
# enable for basic auth
|
||||
#auth_basic "Restricted";
|
||||
#auth_basic_user_file /config/nginx/.htpasswd;
|
||||
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# set expiration of assets to MAX for caching
|
||||
location ~* \.(ico|css|js)(\?[0-9]+)?$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
location ~ ^(.+\.php)(.*)$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
# deny access to .htaccess/.htpasswd files
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user