testing: Update Apache config for newer Debian releases
authorTobias Brunner <tobias@strongswan.org>
Tue, 24 Nov 2015 17:32:23 +0000 (18:32 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 15 Jun 2016 14:24:44 +0000 (16:24 +0200)
It is still compatible with the current release as the config in
sites-available will be ignored, while conf-enabled does not exist and
is not included in the main config.

testing/hosts/winnetou/etc/apache2/conf-enabled/testresults-as-text.conf [new file with mode: 0644]
testing/hosts/winnetou/etc/apache2/conf.d/testresults-as-text [changed from file to symlink]
testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf [new file with mode: 0644]
testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost [deleted file]
testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost.conf [new file with mode: 0644]
testing/scripts/build-guestimages
testing/tests/tnc/tnccs-20-pdp-eap/hosts/alice/etc/apache2/sites-available/000-default.conf [new file with mode: 0644]
testing/tests/tnc/tnccs-20-pdp-eap/hosts/alice/etc/apache2/sites-available/default
testing/tests/tnc/tnccs-20-pdp-pt-tls/hosts/alice/etc/apache2/sites-available/000-default.conf [new file with mode: 0644]
testing/tests/tnc/tnccs-20-pdp-pt-tls/hosts/alice/etc/apache2/sites-available/default

diff --git a/testing/hosts/winnetou/etc/apache2/conf-enabled/testresults-as-text.conf b/testing/hosts/winnetou/etc/apache2/conf-enabled/testresults-as-text.conf
new file mode 100644 (file)
index 0000000..6f5f301
--- /dev/null
@@ -0,0 +1 @@
+AddType text/plain .iptables .log .sql
deleted file mode 100644 (file)
index 6f5f3011c4b651924f595f4f2af8112f850c646f..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-AddType text/plain .iptables .log .sql
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..776e9e99abf120532d0d9bdde5b5c14b11d72d0c
--- /dev/null
@@ -0,0 +1 @@
+../conf-enabled/testresults-as-text.conf
\ No newline at end of file
diff --git a/testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf b/testing/hosts/winnetou/etc/apache2/sites-available/000-default.conf
new file mode 100644 (file)
index 0000000..9335899
--- /dev/null
@@ -0,0 +1,12 @@
+<VirtualHost *:80>
+        ServerAdmin webmaster@localhost
+
+        DocumentRoot /var/www
+        <Directory /var/www/>
+                Options Indexes FollowSymLinks MultiViews
+        </Directory>
+
+        LogLevel warn
+        ErrorLog ${APACHE_LOG_DIR}/error.log
+        CustomLog ${APACHE_LOG_DIR}/access.log combined
+</VirtualHost>
diff --git a/testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost b/testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost
deleted file mode 100644 (file)
index b76080e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# OCSP Server
-
-Listen 8880
-
-AddHandler cgi-script .cgi
-
-<VirtualHost *:8880>
-    ServerAdmin  root@strongswan.org
-    DocumentRoot /etc/openssl/ocsp
-    ServerName   ocsp.strongswan.org
-    ServerAlias         192.168.0.150
-    DirectoryIndex ocsp.cgi
-    <Directory "/etc/openssl/ocsp">
-       Options  +ExecCGI
-       Order allow,deny
-       Allow from all
-   </Directory>
-   ErrorLog     /var/log/apache2/ocsp/error_log
-   CustomLog    /var/log/apache2/ocsp/access_log combined
-</VirtualHost>
-
-Listen 8881
-
-<VirtualHost *:8881>
-    ServerAdmin  root@research.strongswan.org
-    DocumentRoot /etc/openssl/research/ocsp
-    ServerName   ocsp.research.strongswan.org
-    ServerAlias         ocsp.strongswan.org 192.168.0.150
-    DirectoryIndex ocsp.cgi
-    <Directory "/etc/openssl/research/ocsp">
-       Options +ExecCGI
-       Order allow,deny
-       Allow from all
-   </Directory>
-   ErrorLog     /var/log/apache2/ocsp/error_log
-   CustomLog    /var/log/apache2/ocsp/access_log combined
-</VirtualHost>
-
-Listen 8882
-
-<VirtualHost *:8882>
-    ServerAdmin  root@sales.strongswan.org
-    DocumentRoot /etc/openssl/sales/ocsp
-    ServerName   ocsp.sales.strongswan.org
-    ServerAlias         ocsp.strongswan.org 192.168.0.150
-    DirectoryIndex ocsp.cgi
-    <Directory "/etc/openssl/sales/ocsp">
-       Options +ExecCGI
-       Order allow,deny
-       Allow from all
-   </Directory>
-   ErrorLog     /var/log/apache2/ocsp/error_log
-   CustomLog    /var/log/apache2/ocsp/access_log combined
-</VirtualHost>
diff --git a/testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost.conf b/testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost.conf
new file mode 100644 (file)
index 0000000..0772c34
--- /dev/null
@@ -0,0 +1,69 @@
+# OCSP Server
+
+Listen 8880
+
+AddHandler cgi-script .cgi
+
+<VirtualHost *:8880>
+    ServerAdmin  root@strongswan.org
+    DocumentRoot /etc/openssl/ocsp
+    ServerName   ocsp.strongswan.org
+    ServerAlias         192.168.0.150
+    DirectoryIndex ocsp.cgi
+    <Directory "/etc/openssl/ocsp">
+        Options  +ExecCGI
+        <IfModule mod_authz_core.c>
+            Require all granted
+        </IfModule>
+        <IfModule !mod_authz_core.c>
+            Order deny,allow
+            Allow from all
+        </IfModule>
+   </Directory>
+   ErrorLog     /var/log/apache2/ocsp/error_log
+   CustomLog    /var/log/apache2/ocsp/access_log combined
+</VirtualHost>
+
+Listen 8881
+
+<VirtualHost *:8881>
+    ServerAdmin  root@research.strongswan.org
+    DocumentRoot /etc/openssl/research/ocsp
+    ServerName   ocsp.research.strongswan.org
+    ServerAlias         ocsp.strongswan.org 192.168.0.150
+    DirectoryIndex ocsp.cgi
+    <Directory "/etc/openssl/research/ocsp">
+        Options +ExecCGI
+        <IfModule mod_authz_core.c>
+            Require all granted
+        </IfModule>
+        <IfModule !mod_authz_core.c>
+            Order deny,allow
+            Allow from all
+        </IfModule>
+   </Directory>
+   ErrorLog     /var/log/apache2/ocsp/error_log
+   CustomLog    /var/log/apache2/ocsp/access_log combined
+</VirtualHost>
+
+Listen 8882
+
+<VirtualHost *:8882>
+    ServerAdmin  root@sales.strongswan.org
+    DocumentRoot /etc/openssl/sales/ocsp
+    ServerName   ocsp.sales.strongswan.org
+    ServerAlias         ocsp.strongswan.org 192.168.0.150
+    DirectoryIndex ocsp.cgi
+    <Directory "/etc/openssl/sales/ocsp">
+        Options +ExecCGI
+        <IfModule mod_authz_core.c>
+            Require all granted
+        </IfModule>
+        <IfModule !mod_authz_core.c>
+            Order deny,allow
+            Allow from all
+        </IfModule>
+   </Directory>
+   ErrorLog     /var/log/apache2/ocsp/error_log
+   CustomLog    /var/log/apache2/ocsp/access_log combined
+</VirtualHost>
index 3e107c0..8a44b4f 100755 (executable)
@@ -60,6 +60,7 @@ do
        then
                execute "mkdir $LOOPDIR/var/log/apache2/ocsp" 0
                execute "cp -rf $DIR/../images $LOOPDIR/var/www/" 0
+               execute_chroot "a2enmod -q cgid" 0
                execute_chroot "ln -s /etc/openssl/certs /var/www/certs" 0
                execute_chroot "/etc/openssl/generate-crl" 0
                execute_chroot "update-rc.d apache2 defaults" 0
diff --git a/testing/tests/tnc/tnccs-20-pdp-eap/hosts/alice/etc/apache2/sites-available/000-default.conf b/testing/tests/tnc/tnccs-20-pdp-eap/hosts/alice/etc/apache2/sites-available/000-default.conf
new file mode 100644 (file)
index 0000000..4075f75
--- /dev/null
@@ -0,0 +1,31 @@
+WSGIPythonPath /var/www/tnc
+
+<VirtualHost *:80>
+    ServerName tnc.strongswan.org
+    ServerAlias tnc
+    ServerAdmin webmaster@localhost
+
+    DocumentRoot /var/www/tnc
+
+    <Directory /var/www/tnc/config>
+        <Files wsgi.py>
+            <IfModule mod_authz_core.c>
+               Require all granted
+            </IfModule>
+            <IfModule !mod_authz_core.c>
+                Order deny,allow
+                Allow from all
+            </IfModule>
+        </Files>
+    </Directory>
+
+    WSGIScriptAlias / /var/www/tnc/config/wsgi.py
+    WSGIApplicationGroup %{GLOBAL}
+    WSGIPassAuthorization On
+
+    Alias /static/ /var/www/tnc/static/
+
+    ErrorLog ${APACHE_LOG_DIR}/tnc/error.log
+    LogLevel warn
+    CustomLog ${APACHE_LOG_DIR}/tnc/access.log combined
+</VirtualHost>
index 6260006..1dc8b56 100644 (file)
@@ -1,26 +1 @@
-WSGIPythonPath /var/www/tnc
-
-<VirtualHost *:80>
-    ServerName tnc.strongswan.org
-    ServerAlias tnc
-    ServerAdmin webmaster@localhost
-
-    DocumentRoot /var/www/tnc
-
-    <Directory /var/www/tnc/config>
-        <Files wsgi.py>
-            Order deny,allow
-            Allow from all
-        </Files>
-    </Directory>
-
-    WSGIScriptAlias / /var/www/tnc/config/wsgi.py
-    WSGIApplicationGroup %{GLOBAL}
-    WSGIPassAuthorization On
-
-    Alias /static/ /var/www/tnc/static/
-
-    ErrorLog ${APACHE_LOG_DIR}/tnc/error.log
-    LogLevel warn
-    CustomLog ${APACHE_LOG_DIR}/tnc/access.log combined
-</VirtualHost>
+Include sites-available/000-default.conf
\ No newline at end of file
diff --git a/testing/tests/tnc/tnccs-20-pdp-pt-tls/hosts/alice/etc/apache2/sites-available/000-default.conf b/testing/tests/tnc/tnccs-20-pdp-pt-tls/hosts/alice/etc/apache2/sites-available/000-default.conf
new file mode 100644 (file)
index 0000000..4075f75
--- /dev/null
@@ -0,0 +1,31 @@
+WSGIPythonPath /var/www/tnc
+
+<VirtualHost *:80>
+    ServerName tnc.strongswan.org
+    ServerAlias tnc
+    ServerAdmin webmaster@localhost
+
+    DocumentRoot /var/www/tnc
+
+    <Directory /var/www/tnc/config>
+        <Files wsgi.py>
+            <IfModule mod_authz_core.c>
+               Require all granted
+            </IfModule>
+            <IfModule !mod_authz_core.c>
+                Order deny,allow
+                Allow from all
+            </IfModule>
+        </Files>
+    </Directory>
+
+    WSGIScriptAlias / /var/www/tnc/config/wsgi.py
+    WSGIApplicationGroup %{GLOBAL}
+    WSGIPassAuthorization On
+
+    Alias /static/ /var/www/tnc/static/
+
+    ErrorLog ${APACHE_LOG_DIR}/tnc/error.log
+    LogLevel warn
+    CustomLog ${APACHE_LOG_DIR}/tnc/access.log combined
+</VirtualHost>
index 6260006..1dc8b56 100644 (file)
@@ -1,26 +1 @@
-WSGIPythonPath /var/www/tnc
-
-<VirtualHost *:80>
-    ServerName tnc.strongswan.org
-    ServerAlias tnc
-    ServerAdmin webmaster@localhost
-
-    DocumentRoot /var/www/tnc
-
-    <Directory /var/www/tnc/config>
-        <Files wsgi.py>
-            Order deny,allow
-            Allow from all
-        </Files>
-    </Directory>
-
-    WSGIScriptAlias / /var/www/tnc/config/wsgi.py
-    WSGIApplicationGroup %{GLOBAL}
-    WSGIPassAuthorization On
-
-    Alias /static/ /var/www/tnc/static/
-
-    ErrorLog ${APACHE_LOG_DIR}/tnc/error.log
-    LogLevel warn
-    CustomLog ${APACHE_LOG_DIR}/tnc/access.log combined
-</VirtualHost>
+Include sites-available/000-default.conf
\ No newline at end of file