Update 'Extra_Domains/Apache_Domain.sh'
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/"$domain.conf"
|
||||
cat <<EOF > /etc/apache2/sites-available/"$domain.conf"
|
||||
<VirtualHost *:80>
|
||||
#netdata here
|
||||
ServerAdmin $email
|
||||
ServerName $domain
|
||||
ServerAlias www.$domain
|
||||
@@ -37,14 +38,25 @@ a2ensite $domain
|
||||
# Redirect phpmyadmin -> database
|
||||
ln -s /usr/share/phpmyadmin /var/www/"$domain"/html/database
|
||||
|
||||
##-------------##
|
||||
# Netdata #
|
||||
##-------------##
|
||||
|
||||
if [ $netdata = 1 ]
|
||||
then
|
||||
apt install -y netdata
|
||||
sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/g' /etc/netdata/health_alarm_notify.conf
|
||||
ufw allow 19999/tcp
|
||||
sed -i 's+#netdata here+RewriteEngine On\n ProxyRequests Off\n ProxyPreserveHost On\n <Proxy *>\n Require all granted\n </Proxy>\n ProxyPass "/netdata/" "http://localhost:19999/" connectiontimeout=5 timeout=30 keepalive=on\n ProxyPassReverse "/netdata/" "http://localhost:19999/"\n #RewriteRule ^/netdata$ http://%{HTTP_HOST}/netdata/ [L,R=301] #HTTP\n RewriteRule ^/netdata$ https://%{HTTP_HOST}/netdata/ [L,R=301] #HTTPS+g' /etc/apache2/sites-available/"$domain.conf"
|
||||
# systemctl stop netdata
|
||||
# systemctl disable netdata
|
||||
fi
|
||||
|
||||
##-------------##
|
||||
# Certbot #
|
||||
##-------------##
|
||||
|
||||
#certbot --apache -d $domain -d www.$domain
|
||||
#sed -i 's/ssl ipv6only/ssl http2 ipv6only/g' /etc/apache2/sites-available/"$domain"
|
||||
#sed -i 's/listen 443 ssl/listen 443 ssl http2/g' /etc/apache2/sites-available/"$domain"
|
||||
#sed -i 's#include /etc/letsencrypt/options-ssl-apache.conf;#ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;#g' /etc/apache2/sites-available/"$domain"
|
||||
certbot --apache -n -d "$domain" -d "www.$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
||||
|
||||
##---------------##
|
||||
# Wordpress #
|
||||
|
||||
Reference in New Issue
Block a user