Skip to content

Commit 5aa0651

Browse files
committed
Allow additional vhosts
Since Opencast 16+ requires OpenSearch on the admin and presentation nodes, we should provide an option to create a virtual host for this purpose. With this patch all additional vhost configurations from /etc/nginx/sites-enabled/ will be loaded.
1 parent 50c99b6 commit 5aa0651

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ If you want to use Let's Encrypt to generate certificates, you can also include
3636
[`elan.opencast_certbot`](https://galaxy.ansible.com/elan/opencast_certbot)
3737
which will automatically generate TLS certificates for you.
3838

39-
4039
You can also add some custom configuration in the file `/etc/nginx/conf.d/extra.conf`.
4140
The file is included after Opencast's main `location` block.
4241
The role will not modify this file if it exists.
4342

43+
Additionally you can define other virtual hosts in `/etc/nginx/sites-enabled/` directory.
44+
They will be loaded as well.
45+
4446

4547
Example Playbook
4648
----------------
@@ -72,7 +74,7 @@ The role will _not_ replace an existing certificate so you can safely use a `fil
7274
owner: root
7375
group: root
7476
mode: '0400'
75-
notify: reload nginx
77+
notify: Reload nginx
7678
loop:
7779
- key
7880
- crt

templates/nginx.conf

+3
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,7 @@ http {
153153
# Include additional custom configuration
154154
include /etc/nginx/conf.d/extra.conf;
155155
}
156+
157+
# Include dynamic virtual host configurations
158+
include /etc/nginx/sites-enabled/*;
156159
}

0 commit comments

Comments
 (0)