-
|
Hi there, I have adjusted the following in the nginx But no success, any idea what could be missing here ? Stefan |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Is there a specific reason that you need the client ip? |
Beta Was this translation helpful? Give feedback.
-
|
If you dont mind, can you please share your traffik configuration? |
Beta Was this translation helpful? Give feedback.
-
|
Hi Stefan, The functionality you need is achievable with some minor adjustments to the nginx configuration used by acme2certifier. I have created a test build that includes these changes and stored it on Docker Hub. For testing, you can pull it using the following command: docker pull grindsa/acme2certifier:nginx_improvementsWhen using this build or any release from acme2certifier v0.37 onwards, you will need to update the logging configuration. The simplest way to do this is to create a modified nginx.conf file and mount it into your acme2certifier container during startup. Below is the example configuration I used during my tests (please note the changed "Logging Settings" section: Further my (very simple) version: '3.3'
services:
traefik:
image: traefik:latest
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
acme2certifier:
image: grindsa/acme2certifier:nginx_improvements
labels:
- "traefik.enable=true"
- "traefik.http.routers.a2c.rule=Host(`a2c.acme`)"
- "traefik.http.routers.a2c.entrypoints=web"
volumes:
- "./acme2certifier:/var/www/acme2certifier/volume"
- "./nginx.conf:/etc/nginx/nginx.conf"
networks:
default:
external:
name: acme
With these modifications see the client ip (192.168.14.1 in my example) in the logs: PS C:\temp> Invoke-WebRequest -Uri http://a2c.acme/directory
StatusCode : 200
...
ParsedHtml : mshtml.HTMLDocumentClassdocker logs docker logs traefik-acme2certifier-1HTH. Feel free to try and to provide feedback... G. |
Beta Was this translation helpful? Give feedback.
Hi Stefan,
The functionality you need is achievable with some minor adjustments to the nginx configuration used by acme2certifier. I have created a test build that includes these changes and stored it on Docker Hub. For testing, you can pull it using the following command:
When using this build or any release from acme2certifier v0.37 onwards, you will need to update the logging configuration. The simplest way to do this is to create a modified nginx.conf file and mount it into your acme2certifier container during startup. Below is the example configuration I used during my tests (please note the changed "Logging Settings" section: