1

I have the following configuration in one Nginx website:

server {
    listen 80;

    server_name www.example.com;

    location /.well-known {}

    location / {
        proxy_pass http://localhost:3009;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

My idea was to proxy all requests to a node application except the ones to folder /.well-known. But for some reason node is handling all requests.

What've I done wrong?

1 Answer 1

0

Personally, I have my server configured with:

location /.well-known/acme-challenge {
  default_type "text/plain";
  allow all;
  root /srv/www/acme/[domain];
}

That works for me (using certbot).

You can of course change the root location to anything you choose.

1
  • My mistake I thought that the response was the app index.html (it was before the configuration I posted here). But it was nginx default 404 blank page. Thank you.
    – belyid
    Apr 11, 2017 at 18:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .