updated initial order of everything
This commit is contained in:
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
3
install/nginx-conf.sh → install/10-nginx-conf.sh
Executable file → Normal 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
|
3
install/nginx-snippets.sh → install/10-nginx-snippets.sh
Executable file → Normal file
3
install/nginx-snippets.sh → install/10-nginx-snippets.sh
Executable file → Normal 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
|
|
@ -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"
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue