Last active
February 16, 2019 12:45
-
-
Save kirykr/cab6c9941550fdbd43e81d5cd8b2569d to your computer and use it in GitHub Desktop.
Revisions
-
kirykr revised this gist
Feb 16, 2019 . 1 changed file with 38 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ First $ sudo apt-get update $ sudo apt-get install software-properties-common $ sudo add-apt-repository universe $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update Install and configure aws cli in the sever Install certbot-auto user@webserver:~$ wget https://dl.eff.org/certbot-auto user@webserver:~$ chmod a+x ./certbot-auto user@webserver:~$ ./certbot-auto --help $ ./certbot-auto plugins $ sudo apt-get install certbot python-certbot-nginx Run sudo certbot certonly --dns-route53 -i apache -d "*.example.com" -d example.com ln -s /etc/letsencrypt/live/romchong.com/fullchain.pem /opt/bitnami/apache2/conf/server.crt ln -s /etc/letsencrypt/live/romchong.com/privkey.pem /opt/bitnami/apache2/conf/server.key Edit vim /opt/bitnami/apps/wordpress/htdocs/wp-config.php Add to the very bottom of the file the following: define('WP_ENCRYPT_SSL_CERTIFICATES_DIR_PATH', '/etc/letsencrypt/live'); Edit vim /opt/bitnami/apps/wordpress/conf/httpd-prefix.conf Add to the top of the file the following: ``` RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L] ``` -
kirykr revised this gist
Feb 16, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ go to https://certbot.eff.org and select server platform you're using $ sudo apt-get install python-certbot-nginx $ pip install certbot-dns-route53 --user ``` install and configure aws cli in the sever go to EC2 and allow inbounce traffic in Security group for HTTPS `sudo certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -i nginx -d www.example.com -d example.com` -
kirykr revised this gist
Nov 30, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,4 +19,5 @@ go to EC2 and allow inbounce traffic in Security group for HTTPS --- Ref: https://letsencrypt.org/getting-started/ https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html#awscli-install-osx-path -
kirykr revised this gist
Nov 30, 2018 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,3 +14,9 @@ go to https://certbot.eff.org and select server platform you're using configure aws cli in the sever go to EC2 and allow inbounce traffic in Security group for HTTPS `sudo certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -i nginx -d www.example.com -d example.com` --- Ref: https://letsencrypt.org/getting-started/ https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx -
kirykr revised this gist
Nov 30, 2018 . 1 changed file with 41 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ client_max_body_size 30M; server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; } server { listen 443; server_name _; ssl on; ssl_certificate /etc/letsencrypt/live/www.cam-sport-training-center.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/www.cam-sport-training-center.com/privkey.pem; root /var/www/your-site-dir/current/public; location / { passenger_enabled on; rails_env staging; } location ~ \.(js|css|png|jpg|jpeg|gif|ico|html)$ { expires max; gzip_static on; add_header Cache-Control public; break; } location ^~ /assets/ { gzip_static on; expires max; add_header Cache-Control public; } # Drop requests to non-rails requests location ~ \.(aspx|php|jsp|cgi|asp) { return 410; } } -
kirykr revised this gist
Nov 30, 2018 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,5 +8,9 @@ go to https://certbot.eff.org and select server platform you're using $ sudo add-apt-repository universe $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo apt-get install python-certbot-nginx $ pip install certbot-dns-route53 --user ``` configure aws cli in the sever go to EC2 and allow inbounce traffic in Security group for HTTPS `sudo certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -i nginx -d www.example.com -d example.com` -
kirykr created this gist
Nov 30, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ go to `https://letsencrypt.org/getting-started/` read the doc go to https://certbot.eff.org and select server platform you're using ** Install ``` $ sudo apt-get update $ sudo apt-get install software-properties-common $ sudo add-apt-repository universe $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo apt-get install python-certbot-nginx ```