[GH-ISSUE #3484] Error: Can't define Custom locations - status "Offline" - v2.11.1 (latest) #2321

Closed
opened 2026-02-26 07:35:02 +03:00 by kerem · 20 comments
Owner

Originally created by @Gh0stExp10it on GitHub (Jan 21, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3484

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 I've upgraded to the latest version v2.11.1, I can't define Cusom locations for a Proxy Host. The status on the dashboard changes from Online🟢 to Offline🔴.
The previously existing proxy host configuration file is deleted, but not recreated (e.g.: /data/nginx/proxy_host/1.conf).

The output of the container log after pressing the "Save" button on the "Edit Proxy Host" shows the following:

[1/21/2024] [4:59:40 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[1/21/2024] [4:59:40 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/proxy_host/1.conf
[1/21/2024] [4:59:40 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[1/21/2024] [4:59:40 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/proxy_host/1.conf
[1/21/2024] [4:59:40 PM] [Nginx    ] › ⬤  debug     Could not delete file: {
  "errno": -2,
  "code": "ENOENT",
  "syscall": "unlink",
  "path": "/data/nginx/proxy_host/1.conf"
}
[1/21/2024] [4:59:40 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/proxy_host/1.conf.err
[1/21/2024] [4:59:40 PM] [Nginx    ] › ⬤  debug     Could not delete file: {
  "errno": -2,
  "code": "ENOENT",
  "syscall": "unlink",
  "path": "/data/nginx/proxy_host/1.conf.err"
}
[1/21/2024] [4:59:40 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[1/21/2024] [4:59:40 PM] [Nginx    ] › ℹ  info      Reloading Nginx
[1/21/2024] [4:59:40 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -s reload

Nginx Proxy Manager Version
v2.11.1 (latest, as of date 21.01.2024)

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Hosts" and "Proxy Hosts"
  2. Click on the three-dotted menu
  3. Click on edit
  4. Switch to the tab "Custom locations"
  5. Create a new Custom location (example see screenshot below)
  6. Click on the button "Save"
  7. The status should be now switched to Offline

Expected behavior
It should be possible to define a custom location without deleting the proxy conf and thus taking the host offline.
In version v2.10.4 this is possible without any problems. I was able to test this successfully by rolling back to this version.

Screenshots
screenshot-npm-custom-locations-01
screenshot-npm-custom-locations-02

Operating System
Ubuntu Server 22.04.3 LTS

Additional context
/None/

Originally created by @Gh0stExp10it on GitHub (Jan 21, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3484 **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 I've upgraded to the latest version v2.11.1, I can't define ```Cusom locations``` for a ```Proxy Host```. The status on the dashboard changes from *Online*&#128994; to *Offline*&#x1F534;. The previously existing proxy host configuration file is deleted, but not recreated (e.g.: /data/nginx/proxy_host/1.conf). The output of the container log after pressing the "Save" button on the "Edit Proxy Host" shows the following: ```sh [1/21/2024] [4:59:40 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;" [1/21/2024] [4:59:40 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/1.conf [1/21/2024] [4:59:40 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;" [1/21/2024] [4:59:40 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/1.conf [1/21/2024] [4:59:40 PM] [Nginx ] › ⬤ debug Could not delete file: { "errno": -2, "code": "ENOENT", "syscall": "unlink", "path": "/data/nginx/proxy_host/1.conf" } [1/21/2024] [4:59:40 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/1.conf.err [1/21/2024] [4:59:40 PM] [Nginx ] › ⬤ debug Could not delete file: { "errno": -2, "code": "ENOENT", "syscall": "unlink", "path": "/data/nginx/proxy_host/1.conf.err" } [1/21/2024] [4:59:40 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;" [1/21/2024] [4:59:40 PM] [Nginx ] › ℹ info Reloading Nginx [1/21/2024] [4:59:40 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload ``` **Nginx Proxy Manager Version** v2.11.1 (latest, as of date 21.01.2024) **To Reproduce** Steps to reproduce the behavior: 1. Go to "Hosts" and "Proxy Hosts" 2. Click on the three-dotted menu 3. Click on edit 4. Switch to the tab "Custom locations" 5. Create a new Custom location (example see screenshot below) 6. Click on the button "Save" 7. The status should be now switched to *Offline* **Expected behavior** It should be possible to define a custom location without deleting the proxy conf and thus taking the host offline. In version v2.10.4 this is possible without any problems. I was able to test this successfully by rolling back to this version. **Screenshots** <img width="248" alt="screenshot-npm-custom-locations-01" src="https://github.com/NginxProxyManager/nginx-proxy-manager/assets/7295005/96a2f2c9-0f15-43d6-b543-9338d59eadcc"> <img width="113" alt="screenshot-npm-custom-locations-02" src="https://github.com/NginxProxyManager/nginx-proxy-manager/assets/7295005/7671e46c-a5a6-4486-84f9-a1d63809d1e0"> **Operating System** Ubuntu Server 22.04.3 LTS **Additional context** /None/
kerem 2026-02-26 07:35:02 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@tanpro260196 commented on GitHub (Jan 21, 2024):

Most likely a duplicate of this: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3474
TLDR: Using HSTS and custom location at the same time break the config.

<!-- gh-comment-id:1902754478 --> @tanpro260196 commented on GitHub (Jan 21, 2024): Most likely a duplicate of this: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3474 TLDR: Using HSTS and custom location at the same time break the config.
Author
Owner

@tobilektri commented on GitHub (Jan 22, 2024):

Same here:

2024/01/22 10:35:02 [emerg] 747#747: "map" directive is not allowed here in /data/nginx/proxy_host/10.conf:47
2024/01/22 10:35:02 [notice] 751#751: signal process started
<!-- gh-comment-id:1903709443 --> @tobilektri commented on GitHub (Jan 22, 2024): Same here: ``` 2024/01/22 10:35:02 [emerg] 747#747: "map" directive is not allowed here in /data/nginx/proxy_host/10.conf:47 2024/01/22 10:35:02 [notice] 751#751: signal process started ```
Author
Owner

@Kavan72 commented on GitHub (Jan 23, 2024):

Getting same error.

<!-- gh-comment-id:1905220337 --> @Kavan72 commented on GitHub (Jan 23, 2024): Getting same error.
Author
Owner

@RichLii commented on GitHub (Jan 23, 2024):

roll back to 2.10.4 can solve this problem

<!-- gh-comment-id:1905247146 --> @RichLii commented on GitHub (Jan 23, 2024): roll back to 2.10.4 can solve this problem
Author
Owner

@Gh0stExp10it commented on GitHub (Jan 23, 2024):

Most likely a duplicate of this: #3474 TLDR: Using HSTS and custom location at the same time break the config.

Thanks for the additional info.
Unfortunately, this is not the case, HSTS is switched off/deactivated.

<!-- gh-comment-id:1905780117 --> @Gh0stExp10it commented on GitHub (Jan 23, 2024): > Most likely a duplicate of this: #3474 TLDR: Using HSTS and custom location at the same time break the config. Thanks for the additional info. Unfortunately, this is not the case, HSTS is switched off/deactivated.
Author
Owner

@innosflew commented on GitHub (Jan 24, 2024):

I'm experiencing the same issue, and I don't use HSTS either.

<!-- gh-comment-id:1907476134 --> @innosflew commented on GitHub (Jan 24, 2024): I'm experiencing the same issue, and I don't use HSTS either.
Author
Owner

@bleak183 commented on GitHub (Jan 24, 2024):

roll back to 2.10.4 can solve this problem

I can confirm this works

<!-- gh-comment-id:1908646947 --> @bleak183 commented on GitHub (Jan 24, 2024): > roll back to 2.10.4 can solve this problem I can confirm this works
Author
Owner

@ramkrishna757575 commented on GitHub (Jan 25, 2024):

Same here...suddenly all my reverse proxies broke due to this

<!-- gh-comment-id:1910210475 --> @ramkrishna757575 commented on GitHub (Jan 25, 2024): Same here...suddenly all my reverse proxies broke due to this
Author
Owner

@jpdsc commented on GitHub (Jan 25, 2024):

Same here, there is a workaround in https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3474 but will wait until resolved and reverted to :2.10.4 for now.

<!-- gh-comment-id:1910262102 --> @jpdsc commented on GitHub (Jan 25, 2024): Same here, there is a workaround in https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3474 but will wait until resolved and reverted to :2.10.4 for now.
Author
Owner

@mbah-dukun commented on GitHub (Jan 26, 2024):

same here . . . .
is like npm not have permission for execute folder map

<!-- gh-comment-id:1911430848 --> @mbah-dukun commented on GitHub (Jan 26, 2024): same here . . . . is like npm not have permission for execute folder map
Author
Owner

@daraHK88 commented on GitHub (Jan 28, 2024):

i have the same problem

<!-- gh-comment-id:1913546718 --> @daraHK88 commented on GitHub (Jan 28, 2024): i have the same problem
Author
Owner

@TomRobinsonIO commented on GitHub (Jan 28, 2024):

Same issue here, HSTS on/off does not make a difference.

<!-- gh-comment-id:1913669601 --> @TomRobinsonIO commented on GitHub (Jan 28, 2024): Same issue here, HSTS on/off does not make a difference.
Author
Owner

@MattXcz commented on GitHub (Jan 31, 2024):

Same issue:

nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/2.conf:19 nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/2.conf:20 nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/4.conf:19 nginx: [warn] protocol options redefined for 0.0.0.0:443 in /data/nginx/proxy_host/4.conf:19 nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/4.conf:20 nginx: [warn] protocol options redefined for [::]:443 in /data/nginx/proxy_host/4.conf:20 nginx: [emerg] &quot;map&quot; directive is not allowed here in /data/nginx/proxy_host/4.conf:65 nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed

<!-- gh-comment-id:1919356102 --> @MattXcz commented on GitHub (Jan 31, 2024): Same issue: `nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/2.conf:19 nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/2.conf:20 nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/4.conf:19 nginx: [warn] protocol options redefined for 0.0.0.0:443 in /data/nginx/proxy_host/4.conf:19 nginx: [warn] the &quot;listen ... http2&quot; directive is deprecated, use the &quot;http2&quot; directive instead in /data/nginx/proxy_host/4.conf:20 nginx: [warn] protocol options redefined for [::]:443 in /data/nginx/proxy_host/4.conf:20 nginx: [emerg] &quot;map&quot; directive is not allowed here in /data/nginx/proxy_host/4.conf:65 nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed `
Author
Owner

@Mkeefeus commented on GitHub (Jan 31, 2024):

Same issue here as well, HSTS turned off and still unable to start with custom locations

<!-- gh-comment-id:1920123367 --> @Mkeefeus commented on GitHub (Jan 31, 2024): Same issue here as well, HSTS turned off and still unable to start with custom locations
Author
Owner

@liukonen commented on GitHub (Feb 2, 2024):

Using "Latest" branch... Switching boxes because my services just stopped working... adding subdomains, and It goes to offline once the subdomain is added. HSTS does not matter

[2/2/2024] [2:48:15 AM] [Nginx ] › ⬤ debug Could not delete file: {
"errno": -2,
"code": "ENOENT",
"syscall": "unlink",
"path": "/data/nginx/proxy_host/4.conf.err"
}

If I try dropping my version, I get the following errors popping up
nginx: [emerg] "map" directive is not allowed here in /data/nginx/proxy_host/1.conf:44

<!-- gh-comment-id:1922696698 --> @liukonen commented on GitHub (Feb 2, 2024): Using "Latest" branch... Switching boxes because my services just stopped working... adding subdomains, and It goes to offline once the subdomain is added. HSTS does not matter [2/2/2024] [2:48:15 AM] [Nginx ] › ⬤ debug Could not delete file: { "errno": -2, "code": "ENOENT", "syscall": "unlink", "path": "/data/nginx/proxy_host/4.conf.err" } If I try dropping my version, I get the following errors popping up nginx: [emerg] "map" directive is not allowed here in /data/nginx/proxy_host/1.conf:44
Author
Owner

@ramkrishna757575 commented on GitHub (Feb 4, 2024):

I have ditched npm. Vanilla nginx is da wey

<!-- gh-comment-id:1925919976 --> @ramkrishna757575 commented on GitHub (Feb 4, 2024): I have ditched npm. Vanilla nginx is da wey
Author
Owner

@livlif2dfullest commented on GitHub (Feb 5, 2024):

I have the same issue

<!-- gh-comment-id:1927219231 --> @livlif2dfullest commented on GitHub (Feb 5, 2024): I have the same issue
Author
Owner

@AkshayRao27 commented on GitHub (Feb 13, 2024):

See if this solution works for you: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3512#issuecomment-1940868886

<!-- gh-comment-id:1940874262 --> @AkshayRao27 commented on GitHub (Feb 13, 2024): See if this solution works for you: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3512#issuecomment-1940868886
Author
Owner

@github-actions[bot] commented on GitHub (Sep 5, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2330452234 --> @github-actions[bot] commented on GitHub (Sep 5, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Sep 7, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:3263367841 --> @github-actions[bot] commented on GitHub (Sep 7, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2321
No description provided.