This method's downside is that it has to be manually updated annually.
Putting static files in /html/ (/var/www/html) is a little unwieldy I think, but is the other existing method. (Alternatively, the default to Hedgedoc /s/ could be changed)
Date/year-based URLs may be good pattern. The following adds passthrough for two year directories:
```diff
diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml
index 11e78f8..668afa0 100644
--- a/nginx/docker-compose.yaml
+++ b/nginx/docker-compose.yaml
@@ -11,6 +11,8 @@ services:
- ./nginx/templates:/etc/nginx/templates:ro
- ./nginx/includes:/etc/nginx/includes:ro
- ../html:/var/www/html:ro
+ - /var/www/2022:/var/www/2022:ro
+ - /var/www/2023:/var/www/2023:ro
- ../data/certbot/www:/var/www/certbot:ro
- ../data/certbot/conf:/etc/letsencrypt:ro
- ../data/nginx/cache:/data/nginx/cache:rw
diff --git a/nginx/nginx/templates/000-default.conf.template b/nginx/nginx/templates/000-default.conf.template
index 293d02c..40e52b3 100644
--- a/nginx/nginx/templates/000-default.conf.template
+++ b/nginx/nginx/templates/000-default.conf.template
@@ -49,6 +49,10 @@ server {
autoindex off;
}
+ # /YEAR static files
+ location /2022 { root /var/www; autoindex off; }
+ location /2023 { root /var/www; autoindex off; }
+
# default home page goes to hedgedoc document "Main_Page"; please add your own content!
location = / {
return 302 https://${DOMAIN_NAME}/Main_Page;
```
This method's downside is that it has to be manually updated annually.
Putting static files in `/html/` (`/var/www/html`) is a little unwieldy I think, but is the other existing method. (Alternatively, the default to Hedgedoc `/s/` could be changed)
Date/year-based URLs may be good pattern. The following adds passthrough for two year directories:
This method's downside is that it has to be manually updated annually.
Putting static files in
/html/
(/var/www/html
) is a little unwieldy I think, but is the other existing method. (Alternatively, the default to Hedgedoc/s/
could be changed)