Domain and https


We can get domain for free at https://www.duckdns.org/. Firstly, sign in with google. Secondly, search favorite domain. Finally, register IP. That’s all.

If available domain exist, set WordPress > settings > general > WordPress Address (URL) and Site Address (URL) to https://ahamike.duckdns.org.

Use certbot to serve via https like followings.

sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/ahamike.duckdns.org.conf
sudo ln -s /etc/nginx/sites-available/ahamike.duckdns.org.conf /etc/nginx/sites-enabled/ahamike.duckdns.org.conf
sudo rm -rf /etc/nginx/sites-enabled/default

sudo snap install core; sudo snap refresh core
sudo apt remove certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot

sudo vi /etc/nginx/sites-available/ahamike.duckdns.org.conf
------------------
    server_name _;
------------------
    server_name ahamike.duckdns.org www.ahamike.duckdns.org;
------------------
sudo nginx -t
sudo systemctl reload nginx

sudo iptables -I INPUT 2 -p tcp --dport 443 -j ACCEPT

sudo certbot --nginx -d ahamike.duckdns.org -d www.ahamike.duckdns.org

sudo systemctl status snap.certbot.renew.service
sudo certbot renew --dry-run

Leave a Reply

Your email address will not be published. Required fields are marked *