Comet

  • Diary
  • Travel
  • Fun
  • Tech
  1. Main page
  2. Tech
  3. Main content

Wordpress Setup and SSL

January 31, 2022 519hotness 0likes 0comments

Docker compose to set up containers

See docker compose https://github.com/kasakun/wordpress-nginx-docker.

Nginx is the front end, in the mean time Wordpress and mysql serve as a standalone server. This gives me ability to add more service in future easily.

Before starting the container with docker-compose, we need to edit .env to customize data and ssl location. Sometimes we need chmod permission for this folders for Wordpress to write in.

docker-compose up -d # start all containers
docker-compose down # stop all containers
docker logs wp-* # check containers' logs to understand it works correctly

Auto SSL

Here we use acme script from https://github.com/acmesh-official/acme.sh

After installation, we can go ahead to verify the domain and the server that we need to specify the server webroot in the command

acme.sh --issue -d example.com -d www.example.com -d cp.example.com -w $WEBROOT

The $WEBROOT is somehow defined in the .env above. After running this command, it will issue a certificate and meanwhile set up a cron job. This can be checked by

crontab -l
Tag: 2022 Wordpress
Last updated:January 31, 2022

kasakun

Talk less, smile more.

Like
< Last article

Comments

You need to

COPYRIGHT © 2018-2022 Space. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang