Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2017, 11:11 PM
GHRake GHRake is offline
 
Join Date: Sep 2015
Location: USA
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Let's Encrypt + Shared Hosting + Tutorial

This is a little tutorial and review of my experience on installing a free LetsEncrypt SSL certificate. I am not an expert on the topic but I believe this is a pretty solid tutorial.

CERTBOT is developed by the good folks over at the Electronic Frontier Foundation. For people like us that grew up on the internet, the EFF is essential in protecting the freedom we enjoy and I urge you to check them out and support if you can.

I'm sure others may find themselves with the same circumstances:
Shared Hosting, don't have root access and am a Windows user

Certbot requires root access so you have to create it locally on your own computer and then install the certificate manually.
Linux Subsystem for Windows can create the certificate for you but for some reason Renewing wouldn't work so I had to fire up a Ubuntu VM.

Download Ubuntu

Download VMWare Workstation

Create New VM
Select your Ubuntu ISO
I like to use 2 Cores and 2GB RAM

After install:
CTRL + ALT + T -> Pulls up the terminal

Update apps and upgrade OS:
sudo apt-get update && sudo apt-get upgrade

Install net-tools dependency for certbot:
sudo apt install net-tools

Make sure your VM connects through your VPN/proxy if privacy is important because LetsEncrypt logs your IP. They aren't published yet but will be in the future.

Install Certbot:
sudo apt-get certbot

If you use CloudFlare or other CDN, set it to bypass the CDN temporarily or it will fail verification.

Generate certificate on local machine:
sudo certbot certonly --manual -d guidedhacking.com

Follow the prompt

Use webroot verification, it will prompt you to create a file which you will put in:
public_html\.well-known\acme-challenge\

The filename will be a hash and then inside the file you need to paste another hash. I used notepad++ and just uploaded it over FTP rather than doing it over SSH because I'm a linux noob

After verification open cPanel go to SSL module->Install Certificate
Open your first cert file, paste in the first certificate including the ---CERT BEGIN--- and ---CERT ENDS---
Open the privatekey cert file and paste it into the private key text box

You must renew every 90 days by opening your Ubuntu VM and running:
certbot-auto renew

LetsEncrypt will email you 2-3 times before it expires to remind you. There are methods to do automatic renewal on shared hosting using third party projects and cronjobs but I don't mind renewing manually vs reviewing/learning how to use a bunch of potentially time wasting third party scripts.

Make sure to setup https redirect in .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Alternatively in CloudFlare you can set up "Automatic HTTPS Rewrites" on the Crypto page

If you use CloudFlare be sure to play with the settings on the Crypto page and note that the certificate your visitors will see will be a CloudFlare cert. The connection between the visitor and CloudFlare will use the CloudFlare cert and the connection between CloudFlare and your server will use your cert. If you want the end user to see YOUR certificate and use CloudFlare, you can get a certificate through CloudFlare and it's 5$/month, not a bad price but free is better

Backup your database and do some SQL REPLACE magic, be aware this may cause some issues and use with care and double check afterwords for problems. If you're not experienced with SQL, just skip this because you can do damage! Here is a sample query:
UPDATE table_name_here SET column_name_here = REPLACE(column_name_here, 'http://', 'https://)

I did this table by table and then tested it so I didn't blow up the entire database at once. 99% of the replacements I did was quite simple using SQL queries.

In AdminCP Make sure your Site URL etc.. all say https://guidedhacking.com instead of http://

Now fire up HTTPS Everywhere, open the Chrome developer's console and audit your site for HTTP/HTTPS issues.
Reply With Quote
  #2  
Old 05-05-2018, 01:30 PM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is pretty difficult to setup SSL as your guide, if you are using cPanel or Plesk on your shared hosting then you only need some clicks to enable SSL for your websites.

If you are using Directadmin hosting control panel then it can require extra steps to setup SSL but it also is easy to do that.
Reply With Quote
Благодарность от:
blind-eddie
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03701 seconds
  • Memory Usage 2,173KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (1)post_thanks_box_bit
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete