Skip to content

Commit

Permalink
Fixes #1711 : SSL support through Let's Encrypt added
Browse files Browse the repository at this point in the history
  • Loading branch information
sridhar391 committed May 21, 2018
1 parent 8c77eb9 commit adf2a79
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
18 changes: 18 additions & 0 deletions restyaboard-ssl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
listen 443 ssl;

ssl_certificate /etc/nginx/ssl/restya.com.crt;
ssl_certificate_key /etc/nginx/ssl/restya.com.key;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 15m;

# Set system wide SSL settings
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;

#Forward Secrecy
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";

if ($scheme = 'http') {
rewrite ^/(.*)$ https://restya.com/$1 permanent;
}
19 changes: 19 additions & 0 deletions restyaboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,25 @@
set +x
curl -v -L -G -d "app=board&os=${os}&version=${version}" "http://restya.com/success_installation.php"
echo "Restyaboard URL : $webdir"
set +x
echo "Do you want to setup SSL connectivity for your domain (y/n)?"
read -r answer
set -x
case "${answer}" in
[Yy])
cd /opt/
wget https://github.com/certbot/certbot/archive/master.zip -O certbot-master.zip
unzip certbot-master.zip
cd /opt/certbot-master/
sudo -H ./certbot-auto certonly --webroot --no-bootstrap -d $webdir -w $dir
sed -i "s/nginx\/ssl\/restya\.com\.crt/letsencrypt\/live\/$webdir\/fullchain\.pem/g" ${DOWNLOAD_DIR}/restyaboard-ssl.conf
sed -i "s/nginx\/ssl\/restya\.com\.key/letsencrypt\/live\/$webdir\/privkey\.pem/g" ${DOWNLOAD_DIR}/restyaboard-ssl.conf
sed -i "s/restya\.com/$webdir/g" ${DOWNLOAD_DIR}/restyaboard-ssl.conf

sed -i "/client_max_body_size 300M;/r ${DOWNLOAD_DIR}/restyaboard-ssl.conf" /etc/nginx/conf.d/restyaboard.conf

esac

echo "Login with username admin and password restya"
exit 1
}
Expand Down

0 comments on commit adf2a79

Please sign in to comment.