Skip to content

Instantly share code, notes, and snippets.

View ustoopia's full-sized avatar
💭
Exploring the great indoors

ustoopia ustoopia

💭
Exploring the great indoors
View GitHub Profile
@ustoopia
ustoopia / letsencrypt_2018.md
Created September 6, 2018 08:50 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@ustoopia
ustoopia / gist:2a54d06ab990597d139d6eb8a327e470
Last active November 10, 2024 22:36
Config to harden Nginx running Wordpress sites
############ Config to harden Nginx running Wordpress sites
# Paste this in a new file like: /etc/nginx/conf.wp/harden-wordpress.conf
# in main/vhost config add: include /etc/nginx/conf.wp/harden-wordpress.conf;
#
# Restart nginx and voila. This gist is based on:
# https://gist.github.com/nfsarmento/57db5abba08b315b67f174cd178bea88
#
############ WordPress ####################
# Disable logging for favicon and robots.txt
@ustoopia
ustoopia / gist:7036bace2a9ef0b09e4d01f3ff8303fc
Created March 20, 2023 22:24
Nginx config for YouPHPTube streamer
server {
listen 80;
server_name <domain> <www.domain>;
root /var/www;
index index.php;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
@ustoopia
ustoopia / gist:65fc72da890cbb5a4d0108a57187118a
Created March 20, 2023 22:25
Nginx config for YouPHPTube encoder
server {
listen 80;
server_name <URL> <www.URL>;
root /var/www/encoder;
index index.php;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }