initial version

This commit is contained in:
2023-10-12 14:19:44 +02:00
commit 04d1738e55
17 changed files with 374 additions and 0 deletions

View File

@@ -0,0 +1 @@
<h1>hello World</h1>

View File

@@ -0,0 +1,24 @@
<VirtualHost *:80>
ServerName example.fr
ServerAlias www.example.fr
ServerAlias {{ inventory_hostname }}
DocumentRoot /var/www/html/example.fr
CustomLog /var/log/httpd/example.fr_access.log combined
ErrorLog /var/log/httpd/example.fr_error.log
<Directory />
Options none
Allowoverride none
Require all denied
</Directory>
<Directory /var/www/html/example.fr>
Require all granted
</Directory>
<Directory /var/www/html/example.fr/Private>
Options indexes
AuthName "stop"
AuthType Basic
AuthUserFile /etc/httpd/passwd
require valid-user
</Directory>
</VirtualHost>

View File

@@ -0,0 +1,21 @@
{% for vhost in apache_vhosts %}
<VirtualHost *:{{ http_port }}>
ServerName {{ vhost.servername }}
{% for alias in vhost.serveralias %}
ServerAlias {{ alias }}
{% endfor %}
DocumentRoot {{ vhost.documentroot }}
CustomLog {{ vhost.accesslog }} combined
ErrorLog {{ vhost.errorlog }}
<Directory />
Options none
Allowoverride none
Require all denied
</Directory>
<Directory {{ vhost.documentroot }}>
Options {{ vhost.documentrootoptions|default( "none" ) }}
Require all granted
</Directory>
</VirtualHost>
{% endfor %}