Add dottes website details.

This commit is contained in:
Jim Hague 2023-03-08 15:44:34 +00:00
parent 21ed67ee25
commit 958b501725
2 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,52 @@
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName dottes.cryhavoc.org.uk
ErrorLog /var/log/apache2/dottes-error.log
CustomLog /var/log/apache2/dottes-access.log combined
RemoteIPProxyProtocol On
DocumentRoot /srv/jenkins/jobs/Dottes/builds/lastSuccessfulBuild/archive/web
<Directory /srv/jenkins/jobs/Dottes/builds/lastSuccessfulBuild/archive/web>
Options Indexes FollowSymLinks
Options +Includes
# We only want SSI on index.html, but I can't see how to just
# do that. Since we don't have that many .html, just enable it
# for them all. I did use the XBitHack, but X bits aren't
# preserved when the files are archived.
AddOutputFilter INCLUDES .html
AllowOverride None
Order allow,deny
allow from all
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile /var/lib/dehydrated/certs/dottes.cryhavoc.org.uk/fullchain.pem
SSLCertificateKeyFile /var/lib/dehydrated/certs/dottes.cryhavoc.org.uk/privkey.pem
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerName dottes.cryhavoc.org.uk
ErrorLog /var/log/apache2/dottes-error.log
CustomLog /var/log/apache2/dottes-access.log combined
RemoteIPProxyProtocol On
<IfModule rewrite_module>
#
# This redirects all accesses to the HTTPS version of the site.
#
RewriteEngine On
RewriteRule ^/?(.*) https://dottes.cryhavoc.org.uk/$1 [R=301,L]
</IfModule>
</VirtualHost>

View File

@ -0,0 +1,18 @@
dottes_website:
file.managed:
- require:
- sls: apache
- sls: certificates
- names:
- /etc/apache2/sites-available/dottes.cryhavoc.org.uk.conf:
- source: salt://dottes_website/dottes.cryhavoc.org.uk.conf
apache_site.enabled:
- require:
- file: /etc/apache2/sites-available/dottes.cryhavoc.org.uk.conf
- name: dottes.cryhavoc.org.uk
service.running:
- name: apache2
- reload: true
- watch:
- file: /etc/apache2/sites-available/dottes.cryhavoc.org.uk.conf