Skip to content

Instantly share code, notes, and snippets.

@dwaqaddi
dwaqaddi / strapi-laravel-aws-lightsail.txt
Last active November 13, 2021 07:10
Setup Strapi and Laravel on AWS Lightsail (Nginx)
-- SSH to AWS Lightsail Server --
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install nodejs
node -v && npm -v
cd ~
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
sudo nano ~/.profile
source ~/.profile
@dwaqaddi
dwaqaddi / gist:2f61f9a99efc66dc5abb96c19e7b25fd
Created May 14, 2021 08:39
Cloudflare Universal SSL + Nginx 1.17 - Issue: SSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3
You can add the directives below inside location block
//It will force nginx to use SNI
proxy_ssl_server_name on;
//Set the SSL protocols
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Reference:
@dwaqaddi
dwaqaddi / fix-wordpress-permissions.sh
Created January 5, 2021 10:29 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory