Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_validators
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
ansible_lza_validators
Commits
b1cbf562
Commit
b1cbf562
authored
1 year ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
feat: enable HTTPS/TLS for validation service
parent
33dd18b9
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#5608
failed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/configure_apache.yml
+28
-9
28 additions, 9 deletions
tasks/configure_apache.yml
templates/etc/apache2/default.conf.j2
+6
-3
6 additions, 3 deletions
templates/etc/apache2/default.conf.j2
with
34 additions
and
12 deletions
tasks/configure_apache.yml
+
28
−
9
View file @
b1cbf562
---
### APACHE KONFIGURIEREN ###
# symlink /etc/apache2/mods-available/cgi.load to /etc/apache2/mods-enabled/
-
name
:
CGI-Extension-Modul aktivieren
community.general.apache2_module
:
name
:
"
{{
item
}}"
loop
:
-
"
cgid"
-
"
ssl"
register
:
a2enmod
-
name
:
restart apache immediately to make sure mod_ssl is running before configuring TLS. Just notifying the handler doesn't suffice.
ansible.builtin.systemd
:
unit
:
"
apache2"
state
:
restarted
when
:
a2enmod.changed
# noqa no-handler
-
name
:
Apache-Konfigurationsdateien einspielen (copied)
ansible.builtin.copy
:
src
:
"
{{
item.src
}}"
...
...
@@ -24,13 +38,6 @@
notify
:
-
restart apache
# symlink /etc/apache2/mods-available/cgi.load to /etc/apache2/mods-enabled/
-
name
:
CGI-Extension-Modul aktivieren
community.general.apache2_module
:
name
:
"
cgid"
notify
:
-
restart apache
-
name
:
check if config needs to be enabled
ansible.builtin.command
:
"
/usr/sbin/a2query
-c
serve-cgi-bin"
register
:
a2query
...
...
@@ -70,8 +77,8 @@
<div>
Willkommen auf dem Validierungs- und Konvertierungsserver des SLUBarchivs. Das sind deine Alternativen.
<ul>
<li><a href="http://{{ ansible_fqdn }}/cgi-bin/is_valid/pdfa">Validierung</a></li>
<li><a href="http://{{ ansible_fqdn }}/cgi-bin/convert_to/pdfa">Konvertierung zu PDF/A</a></li>
<li><a href="http
s
://{{ ansible_fqdn }}/cgi-bin/is_valid/pdfa">Validierung</a></li>
<li><a href="http
s
://{{ ansible_fqdn }}/cgi-bin/convert_to/pdfa">Konvertierung zu PDF/A</a></li>
</ul>
</div>
</body>
...
...
@@ -87,3 +94,15 @@
state
:
present
notify
:
-
restart apache
-
name
:
copy server sertificates
ansible.builtin.copy
:
src
:
"
{{
role_path
}}/../ansible_vaults/{{
role_name
}}/{{
ansible_hostname
}}/{{
item
}}"
dest
:
"
/etc/ssl/certs/{{
item
}}"
mode
:
"
0600"
loop
:
-
"
server.key"
-
"
server.pem"
#- "usr/local/share/ca-certificates/GEANT.crt"
notify
:
-
restart apache
This diff is collapsed.
Click to expand it.
templates/etc/apache2/default.conf.j2
+
6
−
3
View file @
b1cbf562
...
...
@@ -28,15 +28,18 @@
#Include conf-available/serve-cgi-bin.conf
</
VirtualHost
>
<
VirtualHost
{{ ansible_default_ipv4.address }}:
80
>
ServerName
sdvlzavalidate
<
VirtualHost
{{ ansible_default_ipv4.address }}:
443
>
ServerName
{{ ansible_hostname }}
ServerAdmin
webmaster@localhost
DocumentRoot
/var/www/html
ScriptAlias
"/cgi-bin/" "/usr/lib/cgi-bin/"
SSLEngine
on
SSLCertificateFile
/etc/ssl/certs/server.pem
SSLCertificateKeyFile
/etc/ssl/certs/server.key
ErrorLog
${APACHE_LOG_DIR}/error.log
CustomLog
${APACHE_LOG_DIR}/access.log combined
</
VirtualHost
>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment