Skip to content

Commit

Permalink
Replace corrupted apache2 installer
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Apr 25, 2021
1 parent 987dd7a commit 6267ca7
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion build/035-apache2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
a2enmod ssl
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

if [[ $ver == '' ]]; then
if [[ -e /usr/local/bin/nems-info ]]; then
Expand All @@ -9,3 +9,26 @@ if [[ $ver == '' ]]; then
fi
fi

a2enmod ssl
apt -y install ssl-cert libapache2-mod-security2

# Generating new Snakeoil cert
/usr/sbin/make-ssl-cert generate-default-snakeoil --force-overwrite

/bin/systemctl stop apache2
cp -f /root/nems/nems-migrator/data/1.5/apache2/sites-available/nems-dashboard.conf /etc/apache2/sites-available

a2dissite 000-default
a2ensite nems-dashboard

a2enmod rewrite

# Change Apache footer
a2enmod security2
a2enconf security
/bin/sed -i~ '/SecServerSignature/d' /etc/apache2/conf-available/security.conf
echo "SecServerSignature NEMS_Linux/$ver" >> /etc/apache2/conf-available/security.conf

/bin/systemctl start apache2

exit 0

0 comments on commit 6267ca7

Please sign in to comment.