diff options
Diffstat (limited to 'infrastructure')
| -rw-r--r-- | infrastructure/roles/web/README.md | 1 | ||||
| -rw-r--r-- | infrastructure/roles/web/tasks/main.yaml | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/infrastructure/roles/web/README.md b/infrastructure/roles/web/README.md index 65f042a..f0a3548 100644 --- a/infrastructure/roles/web/README.md +++ b/infrastructure/roles/web/README.md @@ -3,3 +3,4 @@ You can create `$HOME/public_html` and Apache http exposes content to `/~$USER/`. Content negotiation is enabled by default, so a request to `/~foo/bar` serves `/home/foo/public_html/bar.html`. +Content negotiation applies to indexes too. diff --git a/infrastructure/roles/web/tasks/main.yaml b/infrastructure/roles/web/tasks/main.yaml index 6e18cfa..bfa56f7 100644 --- a/infrastructure/roles/web/tasks/main.yaml +++ b/infrastructure/roles/web/tasks/main.yaml @@ -55,3 +55,18 @@ RedirectMatch "^/$" "https://ñix.es/cgit/alex/ñix.es.git/about/" </VirtualHost> notify: restart web +- name: gemini + ansible.builtin.copy: + dest: /etc/apache2/conf-enabled/gemini.conf + content: | + AddType text/gemini .gmi + # With the default dir module configuration disabled, DirectoryIndex index enables multiviews for indexes. + # This means that you can have index.html and index.gmi and the client and server will negotiate which content to deliver. + DirectoryIndex index + LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so + notify: restart web +- name: disable dir mod + ansible.builtin.command: + cmd: a2dismod -f dir + removes: /etc/apache2/mods-enabled/dir.conf + notify: restart web |
