Enable dmarc.lunch.org.uk website.

This commit is contained in:
Jim Hague 2024-08-23 14:12:56 +01:00
parent b0432f257f
commit 4379bceed8
4 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,45 @@
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName dmarc.lunch.org.uk
ErrorLog /var/log/apache2/dmarc-error.log
CustomLog /var/log/apache2/dmarc-access.log combined
RemoteIPProxyProtocol On
DocumentRoot /srv/dmarcts-report-viewer
<Directory /srv/dmarcts-report-viewer>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
DirectoryIndex dmarcts-report-viewer.php
</Directory>
SSLEngine on
SSLCertificateFile /var/local/certificates/dmarc.lunch.org.uk/fullchain.pem
SSLCertificateKeyFile /var/local/certificates/dmarc.lunch.org.uk/privkey.pem
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerName dmarc.lunch.org.uk
ErrorLog /var/log/apache2/dmarc-error.log
CustomLog /var/log/apache2/dmarc-access.log combined
RemoteIPProxyProtocol On
<IfModule rewrite_module>
#
# This redirects all accesses to the HTTPS version of the site.
#
RewriteEngine On
RewriteRule ^/?(.*) https://dmarc.lunch.org.uk/$1 [R=301,L]
</IfModule>
</VirtualHost>

View File

@ -56,3 +56,22 @@ dmarcts-report-viewer-config:
- name: /srv/dmarcts-report-viewer/dmarcts-report-viewer-config.php - name: /srv/dmarcts-report-viewer/dmarcts-report-viewer-config.php
- source: salt://dmarc_reports/dmarcts-report-viewer-config.php - source: salt://dmarc_reports/dmarcts-report-viewer-config.php
- template: jinja - template: jinja
dmarc-report-viewer-web:
file.managed:
- require:
- sls: apache
- sls: certificates
- sls: php_fpm
- names:
- /etc/apache2/sites-available/dmarc.lunch.org.uk.conf:
- source: salt://dmarc_reports/dmarc.lunch.org.uk.conf
apache_site.enabled:
- require:
- file: /etc/apache2/sites-available/dmarc.lunch.org.uk.conf
- name: dmarc.lunch.org.uk
service.running:
- name: apache2
- reload: true
- watch:
- file: /etc/apache2/sites-available/dmarc.lunch.org.uk.conf

View File

@ -16,6 +16,7 @@ gpodder_web:
- require: - require:
- sls: apache - sls: apache
- sls: certificates/client - sls: certificates/client
- sls: php_fpm
- names: - names:
- /etc/apache2/sites-available/gpodder.lunch.org.uk.conf: - /etc/apache2/sites-available/gpodder.lunch.org.uk.conf:
- source: salt://gpodder/gpodder.lunch.org.uk.conf - source: salt://gpodder/gpodder.lunch.org.uk.conf

View File

@ -23,6 +23,7 @@ base:
- swapfile - swapfile
- certificates - certificates
- apache - apache
- php_fpm
- backup - backup
- backup/scabbers - backup/scabbers
- dottes_website - dottes_website