nginx + redirect + lets encrypt = /.well-known/acme-challenge/empty.dir (404)

Discussion in 'General' started by username, Nov 25, 2016.

  1. username

    username New Member

    hello till, hello all, first of all, thanks for your great development and support of ispconfig
    i have a problem with lets encrypt authorization procedure for website what running nginx + subdomain configured
    i think that most types of redirection inside a virtual host, for example created in administration by Redirect Path: /
    # /etc/nginx/sites-available/
    if ($http_host = "") {
      rewrite ^(?!/\b(|stats)\b)/(.*)$ /$2 ;
    makes unusable this location configuration
    # /etc/nginx/sites-available/
    location ~ /\.well-known/acme-challenge/ {
      root /usr/local/ispconfig/interface/acme/;
      index index.html index.htm;
      try_files $uri =404;
    and the final effect is that this subdomain address http(s):// returns 404 not found
    # /var/log/letsencrypt/letsencrypt.log
    Detail: Invalid response from[hash]
    i think that it is really a problem because redirection for website, subdomain (or maybe aliasdomain) can be set through client/reseller administration = clients/resellers are able to break this authorization procedure for authorized websites
    i found this discussion and i think it is similar to my problem: - but already closed/solved
    thanks for investigation
    Last edited: Nov 25, 2016

Share This Page