diff --git a/docker/nginx-default.conf b/docker/nginx-default.conf index 162dbc7..c9bfa71 100644 --- a/docker/nginx-default.conf +++ b/docker/nginx-default.conf @@ -2,16 +2,17 @@ server { listen 80 default_server; listen [::]:80 default_server; server_tokens off; + autoindex off; # https://alexanderallen.medium.com/forwarding-nginx-logs-to-docker-3bb6283a207 error_log stderr warn; access_log /dev/stdout main; root /home/www/phpMyAdmin; + client_max_body_size 512M; + location / { - autoindex on; index index.php; - client_max_body_size 512M; } location /.nginx/status { @@ -19,23 +20,15 @@ server { allow all; } - location ~ ^/.phpfpm/(status|ping)$ { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - fastcgi_pass 127.0.0.1:9000; - } - - location /robots.txt { - return 200 "User-agent: *\nDisallow: /\n"; + location ~ ^/.phpfpm/(status|ping)$ { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + fastcgi_pass 127.0.0.1:9000; } - location /.git { - deny all; - } - - location /vendor { - deny all; - } + location ~ ^(?!(\/favicon\.ico|\/robots\.txt|\/index\.php|\/url\.php|\/show_config_errors\.php|\/js\/messages\.php|\/js\/dist|\/js\/vendor|\/doc\/html|\/setup|\/themes|\/)) { + deny all; + } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000;