updated initial order of everything

This commit is contained in:
Joby 2024-10-24 18:53:58 -06:00
parent 89760da428
commit 10d272f911
5 changed files with 11 additions and 3 deletions

3
install/nginx-conf.sh → install/10-nginx-conf.sh Executable file → Normal file
View file

@ -30,3 +30,6 @@ cp -v "$SRC_DIR"/*.conf "$DEST_DIR/"
echo "Setting permissions..."
chown root:root "$DEST_DIR"/*.conf
chmod 644 "$DEST_DIR"/*.conf
# Reload nginx
service nginx reload

View file

@ -30,3 +30,6 @@ cp -v "$SRC_DIR"/*.conf "$DEST_DIR/"
echo "Setting permissions..."
chown root:root "$DEST_DIR"/*.conf
chmod 644 "$DEST_DIR"/*.conf
# Reload nginx
service nginx reload

View file

@ -35,9 +35,8 @@ actionban = grep -q '^<ip> 1;$' /etc/nginx/maps/banned_ips.conf || echo '<ip> 1;
actionunban = sed -i '/^<ip> 1;$/d' /etc/nginx/maps/banned_ips.conf && nginx -s reload
ACTIONFILE
# Test NGINX configuration
echo "Testing NGINX configuration..."
nginx -t
# Reload nginx
service nginx reload
echo "Installation complete!"
echo "Now add 'nginx-banned-ips' to the action line in your existing fail2ban jail configurations"

View file

@ -12,6 +12,9 @@ HOSTNAME=$(hostname -f)
# Install MySQL and Certbot
apt install mysql-server certbot -y
# Restart nginx for good measure
service nginx restart
# Generate SSL certificate
certbot certonly --webroot -w /var/www/default -d $HOSTNAME --agree-tos --register-unsafely-without-email --non-interactive