Skip to content

Commit

Permalink
update serve-mode to look for html files without providing extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed Jul 11, 2024
1 parent 75be8ea commit 4848656
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion defaults/main/2_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defaults_site:
plain_site: true # if http site (only used for redirect to https) should be created
plain_only: false # only create http site (behind other proxy)
plain_redirect: 'preserve_domain' # keep hostname from plain request => any other value will set the redirect to the main-domain
main_redirect: false # redirect all requests to the primary site-domain
main_redirect: false # redirect all requests to the primary site-domain (canonical)

config: {} # site-specific setting-value pairs
config_additions: [] # lines that will 1-to-1 be appended to the site-config (directory config etc.)
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/nginx/sites-available/inc/site_https.j2
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ server {

{% elif site.mode in ['serve', 'server'] %}
# serve-mode config
try_files $uri $uri/ /{{ site.serve.index[0] | default(site.server.index[0]) }} =404;
try_files $uri $uri.html $uri/ /{{ site.serve.index[0] | default(site.server.index[0]) }} =404;
{% endif %}

{% if site.config_additions_root | length > 0 %}
Expand Down

0 comments on commit 4848656

Please sign in to comment.