Showing posts with label simple. Show all posts
Showing posts with label simple. Show all posts

November 06, 2025

Migrate from Nginx to Caddy for SSL auto-renewal in Amazon AWS EC2

 Dear friends,

Today, we will see a simple migration with less configuration of SSL auto-renewal.

I was using Nginx for SSL auto-renewal using certbot. Every 90 days, the renewal code should run, I made one more service it.

I have come across Caddy, which does an auto-renewal of SSL automatically with certbot. Reducing efforts and making the system smooth.

Follow the steps below

Stop and disable the Nginx

sudo systemctl stop nginx

sudo systemctl disable nginx

Install the Caddy

In EC2, if you are running Amazon Linux, then execute the following to install Caddy.

    sudo yum -y install yum-plugin-copr

    sudo yum -y copr enable @caddy/caddy epel-8-$(arch)

    sudo yum -y install caddy

Edit and configure the Caddyfile

Usually, it will be in the path /etc/caddy/Caddyfile

sudo vi /etc/caddy/Caddyfile

I have only one server that is running locally. So, my configuration is easy

domain_name {

    reverse_proxy localhost:port

}

You can configure more with your existing Nginx sites-enabled reference.

Happy SSLing.

If you like the blog or want to comment, kindly reach out to psrdotcom@gmail.com


July 19, 2020

Simple free and open source generating QR code in your web page or blog with an API call

Hi folks,

Do you want to generate QR codes and display in your website or blog or for development.

You can call these API with the relevant data to get the QR code as an image format

    cht -> Chart Type = QR
    chl -> Chart Data = data
    choe -> Chart Encoding = UTF-8
    chs -> Chart Size = width x height
    size = width x heigth
    data = text data which we want to place in QR code

    
    Request Body    
{
    "frame_name": "bottom-frame",
    "qr_code_text": "https://www.qr-code-generator.com/",
    "image_format": "SVG",
    "frame_color": "#02bfff",
    "frame_text_color": "#ffffff",
    "frame_icon_name": "mobile",
    "frame_text": "Scan me",
    "marker_left_template": "version13",
    "marker_right_template": "version13",
    "marker_bottom_template": "version13"
    }

Please send your queries and feedback to psrdotcom@gmail.com

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com