summaryrefslogtreecommitdiff
path: root/modules/profiles/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
commit3fef36594a309dc94ca6325aebacae31e38c7aa0 (patch)
treee0179c96f68b7dfcf3f5d0fc6a92251c39e202d1 /modules/profiles/manifests/gandalf_web.pp
parentworkstation by os. (diff)
downloadwebdav_server-3fef36594a309dc94ca6325aebacae31e38c7aa0.tar.gz
webdav_server-3fef36594a309dc94ca6325aebacae31e38c7aa0.tar.xz
Configure gandalf root webserver.
Diffstat (limited to 'modules/profiles/manifests/gandalf_web.pp')
-rw-r--r--modules/profiles/manifests/gandalf_web.pp38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/profiles/manifests/gandalf_web.pp b/modules/profiles/manifests/gandalf_web.pp
new file mode 100644
index 0000000..7aabf2c
--- /dev/null
+++ b/modules/profiles/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',
+ }
+
+}