Comments (4)
hi, please test it once without the Nginx like this:
version: '2.4'
services:
acme-ca-server:
image: knrdl/acme-ca-server:0.2.3
restart: always
environment:
EXTERNAL_URL: http://192.168.221.10:8080
DB_DSN: postgresql://postgres:secret@db/postgres
CA_ENCRYPTION_KEY: U0PgnP9rqlOsw1P5Z9Lj0BDVcRZEatA8OcomQSR9vLw=
WEB_ENABLE_PUBLIC_LOG: true
WEB_APP_TITLE: ACME CA Test
+ ports:
+ - "8080:8080"
networks:
- net
volumes:
- ./ca.key:/import/ca.key:ro # needed once to import new ca
- ./ca.pem:/import/ca.pem:ro # needed once to import new ca
mem_limit: 250m
My guess is that the Nginx changes the upstream hostname into "acme-acme-ca-server-1". But as a security measure the ACME server checks if the request hostname equals the one from the EXTERNAL_URL
env var. If you show me your nginx template I can try to reproduce it.
from acme-ca-server.
Thanks for the quick response.
Yes that solved my problem, thank you!!!
This is my nginx template config
server {
listen 8080;
server_name ${NGINX_HOST};
location / {
proxy_pass http://${ACME_SERVER_NAME}:${ACME_SERVER_PORT}/;
}
}
And this is the nginx container from docker-compose
acme_proxy:
image: nginx:1.22.1-alpine
restart: always
ports:
- "8080:8080"
networks:
- net
environment:
- NGINX_HOST=acme.com
- ACME_SERVER_NAME=acme-acme-ca-server-1
- ACME_SERVER_PORT=8080
volumes:
- ./nginx/templates:/etc/nginx/templates
How should i set it in order to get it working?
from acme-ca-server.
this prevents nginx from changing the request host header into the respective upstream value:
server {
listen 8080;
server_name ${NGINX_HOST};
location / {
proxy_pass http://${ACME_SERVER_NAME}:${ACME_SERVER_PORT}/;
+ proxy_set_header Host $http_host;
}
}
from acme-ca-server.
Thanks, it worked!
from acme-ca-server.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acme-ca-server.