Update default.conf.sample to deny dotfile access#192
Conversation
Signed-off-by: Eric Nemchik <eric@nemchik.com>
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
Signed-off-by: Eric Nemchik <eric@nemchik.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the default nginx site sample to block dotfile requests by default while carving out access to /.well-known, which is commonly needed for ACME and similar verification flows in the base image's default web server setup.
Changes:
- Added a
/.well-knownlocation intended to remain publicly accessible. - Replaced the previous
.ht*-only deny rule with a broader dotfile deny rule. - Reformatted the inline PHP file-existence guard and bumped the sample config version header.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Allow access to the ".well-known" directory | ||
| location ^~ /.well-known { | ||
| allow all; | ||
| } | ||
|
|
||
| # deny access to all dotfiles | ||
| location ~ /\. { |
| index index.html index.htm index.php; | ||
|
|
||
| # Allow access to the ".well-known" directory | ||
| location ^~ /.well-known { |
|
I am a bot, here are the test results for this PR:
|
No description provided.