Guest Join UsHey Guest,
Welcome, Join our awesome community where you can discuss on various topics :-
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Much More.. or Create an Account


I am super Awesome Announcement, with links and can be used to announce important things. Check here
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Issue with Let's Encrypt container
#1
Hello!

First of all, thank you for the wonderful containers! Absolutely love them!

I have a question on how to get the Let's encrypt container to work. I'm certain that it's a standard PEBCAK issue and was hoping for some guidance.

My setup is as follows:

Synology NAS with 3 containers:
 - Nginx (dimaj/alpine-s6-nginx)
 - Let's Encrypt (linuxserver/letsencrypt)
 - PhpLdapAdmin (dinkel/phpldapadmin)

Volume mappings are as follows:
 - Nginx: /volume1/docker/nginx -> /config
 - Let's Encrypt: /volume1/docker/nginx/certs/LE -> /config

I've configured Nginx:
 - /volume1/nginx/sites-enabled/ldap.conf
Code:
server {
    listen 80;
    server_name ldap.domain.com

    include /config/snippets/letsencrypt.conf;
    location / {
        try_files    $uri $uri/ =404;
    }
}
server { # ldap configuration
    listen 443;
    server_name ldap.domain.com;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;

        proxy_pass http://192.168.1.38:1234/phpMyAdmin;
    }

    access_log   logs/ldap.access.log  main;
    error_log    logs/ldap.error.log;
}

When I start LE container, I eventually get this error:
Code:
ldap.domain.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://ldap.domain.com/.well-known/acme-challenge/some_code: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"

The snippets folder contains the following:
- letsencrypt.conf
Code:
location ^~ /.well-known/acme-challenge/ {
    default_type "text/plain";
    root /config/letsencrypt;
}

I know that I am missing something, just not quite sure what. Any help is greatly appreciated.

Thanks.

Just as I have suspected... configuration error...
I had to modify my ldap.conf in my nginx container to include:
Code:
server {
    listen 80;
    server_name ~^(subdomain1|subdomain2|subdomainN)\.example\.com$;

    location / {
        proxy_pass http://192.168.1.38:10000; # I am mapping host port 10000 to Let's Encrypt container 80
    }
}

After I've restarted my nginx container and LE container, everything worked like a charm!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

About LinuxServer.io

Focus MyBB Theme is designed for MyBB 1.8 series and is tested properly till the most current version of MyBB i.e. 1.8.9. It is simple, clean and light MyBB theme with use of font-awesome icons and shrinking header.

For any more information, please use our contact form.

              Quick Links

              User Links

              Advertise