4 ms·
In nginx, best to just not serve dot files: location ~ /\. { deny all; access_log off; log_not_found off; }
by nodesocket 11y ago
In nginx, best to just not serve dot files:
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
- therealmarv 11y agoThis returns 403 and in my opinion logs should not be turned off for that. I would return 404 to not expose that you are blocking . files with your server. My suggestion to put in each server { ... } location ~ /\. { deny all; return 404; }