From 51e3af611b96da7a255155d901227149a83b4fbb Mon Sep 17 00:00:00 2001 From: Nick Daly Date: Sun, 8 Dec 2013 11:37:15 -0600 Subject: [PATCH] Moved Apache configuration to Plinth setup script. James added the Apache Headers module to the makefile, but not the FreedomBox-Setup configuration script. However, it's ridiculous to have multiple locations for that same logic, so now the makefile uses the setup script for the Apache configuration instead. Also, the modules are now fancy and alphabetized. --- Makefile | 12 ++++-------- setup.d/86_plinth | 11 ++++++----- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 4ef0ce82a..0ca2b0640 100644 --- a/Makefile +++ b/Makefile @@ -93,15 +93,11 @@ current-repository.tar.gz: $(ALL_BUT_GZ) apache-install: install -D -m644 share/apache2/plinth.conf $(DESTDIR)/etc/apache2/sites-available/plinth.conf -apache-config: apache-install apache-ssl +apache-config: apache-install apache-modules a2ensite plinth service apache2 reload -apache-ssl: - make-ssl-cert generate-default-snakeoil - a2enmod ssl - a2enmod headers - a2enmod rewrite - a2enmod proxy - a2enmod proxy_http +apache-modules: +# enable all required modules, create snakeoil cert. + ./setup.d/86_plinth service apache2 restart diff --git a/setup.d/86_plinth b/setup.d/86_plinth index e8a7354ff..5ebd0dedf 100755 --- a/setup.d/86_plinth +++ b/setup.d/86_plinth @@ -1,15 +1,16 @@ #!/bin/sh # -# Enable Plinth. +# Enable Apache modules required for Plinth. -echo "Configuring Plinth..." +echo "Configuring Apache for Plinth..." make-ssl-cert generate-default-snakeoil -a2enmod ssl -a2enmod rewrite +a2enmod headers a2enmod proxy a2enmod proxy_http +a2enmod rewrite +a2enmod ssl a2dissite default a2ensite plinth.conf -echo "Done configuring Plinth.." +echo "Done configuring Apache for Plinth."