summaryrefslogtreecommitdiff
path: root/manifests/gandalf_web.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-07-14 01:01:35 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2021-07-14 01:01:35 +0200
commit9df672f85117bc1026229d4110792c53dec05f3f (patch)
tree95ed9b6fbfc2703f42a55eb11bc4b14efda5a969 /manifests/gandalf_web.pp
parentworkstation by os. (diff)
downloadprofiles-9df672f85117bc1026229d4110792c53dec05f3f.tar.gz
profiles-9df672f85117bc1026229d4110792c53dec05f3f.tar.xz
Configure gandalf root webserver.
Diffstat (limited to '')
-rw-r--r--manifests/gandalf_web.pp38
1 files changed, 38 insertions, 0 deletions
diff --git a/manifests/gandalf_web.pp b/manifests/gandalf_web.pp
new file mode 100644
index 0000000..7aabf2c
--- /dev/null
+++ b/manifests/gandalf_web.pp
@@ -0,0 +1,38 @@
+class profiles::gandalf_web {
+
+ class { '::nginx':
+ manage_repo => false,
+ # server_purge => true,
+ package_name => 'nginx',
+ service_config_check => true,
+ }
+
+ $certname = 'bookmark.gandalf.adrift.space'
+
+
+ nginx::resource::server { 'gandalf':
+ ipv6_enable => true,
+ listen_options => 'default_server',
+ ipv6_listen_options => 'default_server',
+ server_name => [ '_' ],
+ access_log => absent,
+ error_log => absent,
+ ssl => true,
+ ssl_cert => "/etc/letsencrypt/live/${certname}/fullchain.pem",
+ ssl_key => "/etc/letsencrypt/live/${certname}/privkey.pem",
+ ssl_redirect => true,
+ index_files => [ 'index.html', ],
+ www_root => '/var/www/adrift.space',
+ use_default_location => false,
+ }
+
+ nginx::resource::location { '/':
+ try_files => ['$uri', '$uri/', '=404'],
+ index_files => [],
+ ssl => true,
+ ssl_only => true,
+ autoindex => on,
+ server => 'gandalf',
+ }
+
+}