nginx-proxy-manager: Error after updating - map not allowed here

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you’re not using someone else’s docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug

After updating NPM ( docker compose pull && docker compose up -d) everything was OK until i edited a host.

After that the host started failing. After some debug i found a entry in /var/log/nginx/error.log stating

“map not allowed here”

I managed to find the map entry in the middle of the conf and it’s this:

  map $scheme $hsts_header {
    https   "max-age=63072000; preload";
}

This is suffixed on each of my custom locations for that host.

I edited the _hsts_map.conf to comment them and the error was solved, but this won’t survive a docker restart.

Nginx Proxy Manager Version

v2.11.0 © 2024 jc21.com.

To Reproduce Steps to reproduce the behavior:

  1. Update to latest
  2. Edit any host
  3. Save
  4. See error

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Reactions: 8
  • Comments: 26

Most upvoted comments

Workaround:

create empty file named _hsts_map.conf on the same dir as docker-compose.yaml.

Add this line to the volumes of docker-compose.yaml :

- ./_hsts_map.conf:/app/templates/_hsts_map.conf

jc21/nginx-proxy-manager:github-pr-3478 fixes it for me.

Have same issue, the error is actually visible as well in the UI

issue

Tried with the following

  • ./_hsts_map.conf:/app/templates/_hsts_map.conf Domain works again, but custom locations still not working

I just did a fresh install of npm and the custom locations also dont work for me. edit: downgrading to 2.10.4 fixed the issue for now.

Still this problem is happening with a fresh installation…

This is also what I’m currently experiencing as of February 23, 2024

Have same issue, the error is actually visible as well in the UI issue

Question:

How did you get that error popup ? I had to go miles to figure out what the error was 😃

Hover your mouse over the red ball before the Offline text. i also found it by accident.