How to set up: ghost CMS + Docker + Cloudflare without strict ssl enabled
Fixing error - HTTPS and ERR_TOO_MANY_REDIRECTS

Search for a command to run...
Fixing error - HTTPS and ERR_TOO_MANY_REDIRECTS

No comments yet. Be the first to comment.
One persistent issue our team faced was managing duplicated events in Laravel's queue system. After numerous attempts to solve it, we finally arrived at a solution that helped us handle duplicated messages without losing critical data. The Problem: D...

We constantly attend job interviews where questions about SOLID principles are mandatory. After that, there are usually a couple of questions about design patterns. The candidate may believe that they have finally found a company where these principl...

’ve lost a lot of time struggling to find solution — how to share state between vue.js & Phaser. Currently, I’m interested in learning node.js and decided to do it by developing a browser multiplayer game. Although I have some experience in Vue.js, s...
Production-ready flow to use Apache Kafka with PHP in Docker

Server with installed some Linux OS(I'm using Debian 11)
Installed docker + docker-compose
Installed Nginx
Domain registered on Cloudflare
Cloudflare - almost nothing
Create docker-compose.yaml on your server and copy content from here - https://hub.docker.com/_/ghost/ (docker-compose.yaml block)
version: '3.1'
services:
ghost:
image: ghost:5-alpine
restart: always
ports:
- 2368:2368
environment:
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: example
database__connection__database: ghost
url: https://blog.vladverpeta.com
volumes:
- ghost:/var/lib/ghost/content
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
volumes:
- db:/var/lib/mysql
volumes:
ghost:
db:
PS: Dont forgot setup firewall that will restrict any connections to your server except: 80, 22, 433 ports
Run docker-compose up -d
Edit/create - /etc/nginx/sites-enabled/{your-blog.com}
server {
listen 80;
server_name blog.vladverpeta.com;
location / {
proxy_pass http://localhost:2368;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}
Put eyes on lines 7 and 10, without them, you will have TOO_MANY_REDIRECTS error.
nginx -s reload to apply changes in nginx.That's all, I hope it works for you!)
Don't hesitate to contact me - I'll try to help you🤓