Skip to content

Instantly share code, notes, and snippets.

View Huynt-dev's full-sized avatar
💭
(⌐■_■

Huy Nguyen (David) Huynt-dev

💭
(⌐■_■
View GitHub Profile
@Huynt-dev
Huynt-dev / cloudflare-update-record.sh
Created November 20, 2021 11:02 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)

nginx sites-available folder not found

create the sites-available and sites-enabled folder

sudo mkdir /etc/nginx/sites-available
sudo mkdir /etc/nginx/sites-enabled

edit the http block inside /etc/nginx/nginx.conf and add this line

include /etc/nginx/sites-enabled/*;