aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites/templates
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/websites/templates')
-rw-r--r--deployment/websites/templates/vhost_meetbot.conf36
-rw-r--r--deployment/websites/templates/vhost_static.conf83
-rw-r--r--deployment/websites/templates/vhost_www.conf13
-rw-r--r--deployment/websites/templates/vhost_www_rewrite.conf22
4 files changed, 154 insertions, 0 deletions
diff --git a/deployment/websites/templates/vhost_meetbot.conf b/deployment/websites/templates/vhost_meetbot.conf
new file mode 100644
index 00000000..40a0f92a
--- /dev/null
+++ b/deployment/websites/templates/vhost_meetbot.conf
@@ -0,0 +1,36 @@
+<VirtualHost *:80>
+ ServerAdmin sysadm@mageia.org
+ ServerName meetbot.<%= @domain %>
+ DocumentRoot <%= scope.lookupvar("websites::meetbot::vhostdir") %>
+
+ CustomLog /var/log/httpd/access_meetbot_log combined
+ ErrorLog /var/log/httpd/error_meetbot_log
+ <Directory <%= scope.lookupvar("websites::meetbot::vhostdir") %>>
+ Allow from all
+ <IfModule mod_authz_core.c>
+ Require all granted
+ </IfModule>
+ Options +Indexes
+ IndexIgnore .htaccess *.bak *~ *.txt *.log.html
+ </Directory>
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerAdmin sysadm@mageia.org
+ ServerName meetbot.<%= @domain %>
+ DocumentRoot <%= scope.lookupvar("websites::meetbot::vhostdir") %>
+
+ CustomLog /var/log/httpd/access_meetbot_log combined
+ ErrorLog /var/log/httpd/error_meetbot_log
+
+<%= scope.function_template(["apache/vhost_ssl.conf"]) %>
+
+ <Directory <%= scope.lookupvar("websites::meetbot::vhostdir") %>>
+ Allow from all
+ <IfModule mod_authz_core.c>
+ Require all granted
+ </IfModule>
+ Options +Indexes
+ IndexIgnore .htaccess *.bak *~ *.txt *.log.html
+ </Directory>
+</VirtualHost>
diff --git a/deployment/websites/templates/vhost_static.conf b/deployment/websites/templates/vhost_static.conf
new file mode 100644
index 00000000..fcadc425
--- /dev/null
+++ b/deployment/websites/templates/vhost_static.conf
@@ -0,0 +1,83 @@
+<VirtualHost *:80>
+ ServerName static.<%= @domain %>
+
+ DocumentRoot <%= scope.lookupvar("websites::static::vhostdir") %>
+ CustomLog /var/log/httpd/static_log combined
+ ErrorLog /var/log/httpd/error_static_log
+
+ FileETag none
+ Header unset ETag
+ ExpiresActive On
+ ExpiresByType text/css "access plus 1 month"
+ ExpiresByType image/gif "access plus 2 months"
+ ExpiresByType image/png "access plus 2 months"
+ ExpiresByType image/jpeg "access plus 2 months"
+ ExpiresByType image/x-icon "access plus 2 months"
+ ExpiresByType application/x-javascript "access plus 1 month"
+ ExpiresByType text/javascript "access plus 1 month"
+ AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
+ AddOutputFilterByType DEFLATE application/json text/javascript application/javascript application/x-javascript
+
+ <Location />
+ Deny from all
+ </Location>
+
+ <Location /g/>
+ Allow from all
+ </Location>
+
+ <Directory <%= scope.lookupvar("websites::static::vhostdir") %>>
+ Order deny,allow
+ Deny from All
+ AllowOverride None
+ </Directory>
+
+ <Directory <%= scope.lookupvar("websites::static::vhostdir") %>/g>
+ Order deny,allow
+ Allow from All
+ AllowOverride None
+ </Directory>
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName static.<%= @domain %>
+
+ DocumentRoot <%= scope.lookupvar("websites::static::vhostdir") %>
+ CustomLog /var/log/httpd/static_log combined
+ ErrorLog /var/log/httpd/error_static_log
+
+<%= scope.function_template(["apache/vhost_ssl.conf"]) %>
+
+ FileETag none
+ Header unset ETag
+ ExpiresActive On
+ ExpiresByType text/css "access plus 1 month"
+ ExpiresByType image/gif "access plus 2 months"
+ ExpiresByType image/png "access plus 2 months"
+ ExpiresByType image/jpeg "access plus 2 months"
+ ExpiresByType image/x-icon "access plus 2 months"
+ ExpiresByType application/x-javascript "access plus 1 month"
+ ExpiresByType text/javascript "access plus 1 month"
+ AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
+ AddOutputFilterByType DEFLATE application/json text/javascript application/javascript application/x-javascript
+
+ <Location />
+ Deny from all
+ </Location>
+
+ <Location /g/>
+ Allow from all
+ </Location>
+
+ <Directory <%= scope.lookupvar("websites::static::vhostdir") %>>
+ Order deny,allow
+ Deny from All
+ AllowOverride None
+ </Directory>
+
+ <Directory <%= scope.lookupvar("websites::static::vhostdir") %>/g>
+ Order deny,allow
+ Allow from All
+ AllowOverride None
+ </Directory>
+</VirtualHost>
diff --git a/deployment/websites/templates/vhost_www.conf b/deployment/websites/templates/vhost_www.conf
new file mode 100644
index 00000000..399681be
--- /dev/null
+++ b/deployment/websites/templates/vhost_www.conf
@@ -0,0 +1,13 @@
+Redirect /wiki https://wiki.mageia.org/#
+
+# Everything under /g/ is static content to be served by a secondary host
+RewriteEngine On
+RewriteRule ^g/(.+)$ https://static.mageia.org/g/$1 [R,L,QSA]
+
+ErrorDocument 404 /404.php
+
+php_value short_open_tag false
+
+# switch all to https
+RewriteCond %{HTTPS} !=on
+RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
diff --git a/deployment/websites/templates/vhost_www_rewrite.conf b/deployment/websites/templates/vhost_www_rewrite.conf
new file mode 100644
index 00000000..c7bb2fd5
--- /dev/null
+++ b/deployment/websites/templates/vhost_www_rewrite.conf
@@ -0,0 +1,22 @@
+RewriteEngine On
+RewriteRule ^/mailman/listinfo/mageia-annnounce https://ml.mageia.org/l/info/announce [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-artwork https://ml.mageia.org/l/info/atelier-discuss [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-bugsquad https://ml.mageia.org/l/info/bugsquad-discuss [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-dev https://ml.mageia.org/l/info/dev [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-discuss https://ml.mageia.org/l/info/discuss [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-i18n https://ml.mageia.org/l/info/i18n-discuss [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-marketing https://ml.mageia.org/l/info/atelier-discuss [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-sysadm https://ml.mageia.org/l/info/sysadmin-discuss [R=301,L]
+RewriteRule ^/mailman/listinfo/mageia-webteam https://ml.mageia.org/l/info/atelier-discuss [R=301,L]
+RewriteRule ^/mailman https://ml.mageia.org/ [R=301,L]
+
+RewriteRule ^/pipermail/mageia-announce/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-announce/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-artwork/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-artwork/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-bugsquad/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-bugsquad/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-dev/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-dev/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-discuss/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-discuss/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-i18n/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-i18n/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-marketing/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-marketing/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-sysadm/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-sysadm/$1 [R=301,L]
+RewriteRule ^/pipermail/mageia-webteam/?(.*)$ https://archives.mageia.org/zarb-ml/mageia-webteam/$1 [R=301,L]
+RewriteRule ^/pipermail https://archives.mageia.org/zarb-ml/ [R=301,L]