probe-backup-files:
[ -f /sqldump ]
[ -f /sites && -d /sites ]
+# [ -f /boycottsony.org.conf ]
+# [ -f /dayagainstdrm.org.conf ]
+# [ -f /rotten-apple.org.conf ]
+# [ -f /defectivebydesign.org.conf ]
install-sqldump:
# source the dump twice - once to create the DB, once to populate it
cd /var/www/html
cp -r /sites sites
+#install-apache-sites-conf:
+# cp /*.conf /etc/apache2/sites-available/
+# a2ensite boycottsony.org
+# a2ensite dayagainstdrm.org
+# a2ensite rotten-apple.org
+# a2ensite www.defectivebydesign.org
+# systemctl reload apache2
+
# recipes for building a chroot. notice that sql does not cooperate with chroots, due to some funky postinstall hooks and /proc namespaces conflicting
build-chroot: new-chroot install-pkgs-in-chroot install-drupal-toolchain
--- /dev/null
+<VirtualHost *:80>
+ ServerName boycottsony.org
+ ServerAlias www.boycottsony.org
+
+ ### redirect to same domain name, but HTTPS. required for HSTS
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName boycottsony.org
+ ServerAlias www.boycottsony.org
+
+ Redirect / https://www.defectivebydesign.org/sony/
+
+ Include /etc/apache2/sites-available/www.defectivebydesign.org-ssl-common.conf
+
+</VirtualHost>
--- /dev/null
+<VirtualHost *:80>
+ ServerName dayagainstdrm.org
+ ServerAlias www.dayagainstdrm.org
+
+ ### redirect to same domain name, but HTTPS. required for HSTS
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName dayagainstdrm.org
+ ServerAlias www.dayagainstdrm.org
+ ServerAdmin webmaster@fsf.org
+
+ Header set Access-Control-Allow-Origin "my.fsf.org"
+
+ RewriteEngine On
+
+ RewriteRule ^/$ https://defectivebydesign.org/dayagainstdrm
+ RewriteRule ^/2016$ https://www.defectivebydesign.org/dayagainstdrm/2016
+ RewriteRule ^/2017$ https://www.defectivebydesign.org/dayagainstdrm/2017
+ RewriteRule ^/2018$ https://www.defectivebydesign.org/dayagainstdrm/2018
+ RewriteRule ^/2019$ https://www.defectivebydesign.org/dayagainstdrm/2019
+
+ Include /etc/apache2/sites-available/www.defectivebydesign.org-ssl-common.conf
+
+</VirtualHost>
+
--- /dev/null
+<VirtualHost *:80>
+ ServerName rotten-apple.org
+ ServerAlias www.rotten-apple.org
+
+ ### redirect to same domain name, but HTTPS. required for HSTS
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName rotten-apple.org
+ ServerAlias www.rotten-apple.org
+
+ #Redirect / https://www.defectivebydesign.org/apple
+ Redirect / https://www.fsf.org/campaigns/apple-patents
+
+ Include /etc/apache2/sites-available/www.defectivebydesign.org-ssl-common.conf
+
+</VirtualHost>
--- /dev/null
+<VirtualHost *:80>
+ ServerName www0.defectivebydesign.org
+ ServerAlias www.defectivebydesign.org
+ ServerAlias defectivebydesign.com
+ ServerAlias defectivebydesign.net
+ ServerAlias www.defectivebydesign.com
+ ServerAlias www.defectivebydesign.net
+ ServerAlias dbd.fsf.org
+ #ServerAlias dbd.gnu.org
+ #ServerAlias www.stopdrm.org
+ #ServerAlias stopdrm.org
+ ServerAlias defectivebydesign.org
+ ServerAdmin webmaster@fsf.org
+
+ ### redirect to same domain name, but HTTPS. required for HSTS
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName www0.defectivebydesign.org
+ ServerAlias defectivebydesign.com
+ ServerAlias defectivebydesign.net
+ ServerAlias www.defectivebydesign.com
+ ServerAlias www.defectivebydesign.net
+ ServerAlias dbd.fsf.org
+ #ServerAlias dbd.gnu.org
+ #ServerAlias www.stopdrm.org
+ #ServerAlias stopdrm.org
+ ServerAlias defectivebydesign.org
+ ServerAdmin webmaster@fsf.org
+
+ Include /etc/apache2/sites-available/www.defectivebydesign.org-ssl-common.conf
+
+ RedirectMatch permanent (.*) https://www.defectivebydesign.org$1
+
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName www.defectivebydesign.org
+ ServerAdmin webmaster@fsf.org
+
+ Include /etc/apache2/sites-available/www.defectivebydesign.org-ssl-common.conf
+
+ Include /etc/apache2/sites-available/dbd-common.conf
+
+</VirtualHost>
+