diff --git a/states/firewalls/hedwig.sls b/states/firewalls/hedwig.sls index dd5d8a9..0478385 100644 --- a/states/firewalls/hedwig.sls +++ b/states/firewalls/hedwig.sls @@ -4,5 +4,7 @@ hedwig_public: - default: False - ports: - 22/tcp + - 80/tcp + - 443/tcp - require: - firewalld diff --git a/states/lunch_website/dokuwiki_htaccess b/states/lunch_website/dokuwiki_htaccess new file mode 100644 index 0000000..af2a7a0 --- /dev/null +++ b/states/lunch_website/dokuwiki_htaccess @@ -0,0 +1,45 @@ +## Enable this to restrict editing to logged in users only + +## You should disable Indexes and MultiViews either here or in the +## global config. Symlinks maybe needed for URL rewriting. +#Options -Indexes -MultiViews +FollowSymLinks + +## make sure nobody gets the htaccess, README, COPYING or VERSION files + + + Require all denied + + + Order allow,deny + Deny from all + + + +## Don't allow access to git directories + + RedirectMatch 404 /\.git + + +## Uncomment these rules if you want to have nice URLs using +## $conf['userewrite'] = 1 - not needed for rewrite mode 2 +RewriteEngine on +# +RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] +RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] +RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] +RewriteRule ^$ doku.php [L] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule (.*) doku.php?id=$1 [QSA,L] +RewriteRule ^index.php$ doku.php +# +## Not all installations will require the following line. If you do, +## change "/dokuwiki" to the path to your dokuwiki directory relative +## to your document root. +RewriteBase / +# +## If you enable DokuWikis XML-RPC interface, you should consider to +## restrict access to it over HTTPS only! Uncomment the following two +## rules if your server setup allows HTTPS. +#RewriteCond %{HTTPS} !=on +#RewriteRule ^lib/exe/xmlrpc.php$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301] diff --git a/states/lunch_website/dokuwiki_local.php b/states/lunch_website/dokuwiki_local.php new file mode 100644 index 0000000..5bf7620 --- /dev/null +++ b/states/lunch_website/dokuwiki_local.php @@ -0,0 +1,19 @@ + + + + ServerName lunch.org.uk + ServerAlias www.lunch.org.uk + + ErrorLog /var/log/apache2/lunch-error.log + CustomLog /var/log/apache2/lunch-access.log combined + + RemoteIPProxyProtocol On + + Alias / /usr/share/dokuwiki/ + + Options +FollowSymLinks + AllowOverride All + order allow,deny + allow from all + Require all granted + + + + Require all denied + + + + Require all denied + + + SSLEngine on + SSLCertificateFile /var/local/certificates/lunch.org.uk/fullchain.pem + SSLCertificateKeyFile /var/local/certificates/lunch.org.uk/privkey.pem + + + + + + ServerName lunch.org.uk + ServerAlias www.lunch.org.uk + + ErrorLog /var/log/apache2/lunch-error.log + CustomLog /var/log/apache2/lunch-access.log combined + + RemoteIPProxyProtocol On + + + # + # This redirects all accesses to the HTTPS version of the site. + # + RewriteEngine On + + RewriteRule ^/?(.*) https://lunch.org.uk/$1 [R=301,L] + +