Easy SSL Script For Secure Linux Web Server
Page 1 of 1
Easy SSL Script For Secure Linux Web Server
Vid
- Code:
#!/bin/bash
# (c) J~Net 2020
# https://jnet.forumotion.com/t1680-easy-ssl-script-for-secure-linux-web-server#2594
#
# Usage Instructions:
#
# ./setup.sh (for 1 domain)
#
# ./setup.sh primary_domain second_domain (for 2 domains).
#
# More info @
# https://certbot.eff.org/all-instructions
#
if [ "$#" -eq "0" ]
then
echo "Setting up ssl secure web server for Ubuntu Other"
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
sudo /usr/local/bin/certbot-auto --apache
echo "Adding Auto Renewal!"
echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot-auto renew" | sudo tee -a /etc/crontab > /dev/null
echo "All Done!"
else
echo "Setting up ssl secure web server for Ubuntu Other"
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
sudo /usr/local/bin/certbot-auto --apache -d $1 -d $2
echo "Adding Auto Renewal!"
echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot-auto renew" | sudo tee -a /etc/crontab > /dev/null
echo "All Done!"
fi
Last edited by jamied_uk on 4th January 2020, 15:02; edited 3 times in total
Re: Easy SSL Script For Secure Linux Web Server
There is an option to redirect to secure (all traffic) option 2 i choose this to force security!
all the info you need:
your email and domain name for me its jnet.sytes.net
always say yes to continue a to agree terms and no to public your email!
all the info you need:
your email and domain name for me its jnet.sytes.net
always say yes to continue a to agree terms and no to public your email!
Re: Easy SSL Script For Secure Linux Web Server
To setup for multiple domains
digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04
digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04
- Code:
sudo certbot --apache -d your_domain -d www.your_domain
Re: Easy SSL Script For Secure Linux Web Server
This script is for public domains not internal private certs!
so locally you may get warnings but public side you wont get warnings!
so locally you may get warnings but public side you wont get warnings!
Similar topics
» Secure Chat Server For Linux Bash
» Linux Server Status Script
» Linux Web Server Web Dev Vote Polls PHP Script
» Create A Subdomain Linux Apache2 Web Server Script
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Linux Server Status Script
» Linux Web Server Web Dev Vote Polls PHP Script
» Create A Subdomain Linux Apache2 Web Server Script
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|