[GH-ISSUE #292] proxy_headers_hash #260

Closed
opened 2026-02-26 06:31:48 +03:00 by kerem · 6 comments
Owner

Originally created by @modem7 on GitHub (Feb 11, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/292

During startup of the Nginx container, I get the following message:

today at 4:35 PM 2020/02/11 16:35:39 [warn] 190#190: could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size
today at 4:35 PM nginx: [warn] could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size
today at 4:35 PM 2020/02/11 16:35:39 [warn] 190#190: could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size
today at 4:35 PM nginx: [warn] could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size

image

Is there any way to pass an environmental variable to increase this, or do it dynamically?

Thanks

Originally created by @modem7 on GitHub (Feb 11, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/292 During startup of the Nginx container, I get the following message: ``` today at 4:35 PM 2020/02/11 16:35:39 [warn] 190#190: could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size today at 4:35 PM nginx: [warn] could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size today at 4:35 PM 2020/02/11 16:35:39 [warn] 190#190: could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size today at 4:35 PM nginx: [warn] could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size ``` ![image](https://user-images.githubusercontent.com/4349962/74260388-5a0f4180-4cf1-11ea-81da-334a9c6f668b.png) Is there any way to pass an environmental variable to increase this, or do it dynamically? Thanks
kerem 2026-02-26 06:31:48 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@modem7 commented on GitHub (Aug 6, 2020):

Have moved to Traefik, will close issue unless someone else requires this functionality.

<!-- gh-comment-id:669615115 --> @modem7 commented on GitHub (Aug 6, 2020): Have moved to Traefik, will close issue unless someone else requires this functionality.
Author
Owner

@casperse commented on GitHub (Dec 4, 2021):

My proxy just crashed showing this error? any fix to this? (Yes I have 33 sites running on it)

<!-- gh-comment-id:986020363 --> @casperse commented on GitHub (Dec 4, 2021): My proxy just crashed showing this error? any fix to this? (Yes I have 33 sites running on it)
Author
Owner

@jeremysherriff commented on GitHub (Jan 30, 2022):

Create or edit the custom/http.conf file and add the following two lines;

proxy_headers_hash_max_size 1024;
proxy_headers_hash_bucket_size 128;

I have increased x2 over the defaults, you may choose other values that feel appropriate.

<!-- gh-comment-id:1025070104 --> @jeremysherriff commented on GitHub (Jan 30, 2022): Create or edit the `custom/http.conf` file and add the following two lines; ``` proxy_headers_hash_max_size 1024; proxy_headers_hash_bucket_size 128; ``` I have increased x2 over the defaults, you may choose other values that feel appropriate.
Author
Owner

@FroggMaster commented on GitHub (Mar 26, 2023):

Create or edit the custom/http.conf file and add the following two lines;

proxy_headers_hash_max_size 1024;
proxy_headers_hash_bucket_size 128;

I have increased x2 over the defaults, you may choose other values that feel appropriate.

I know it's been awhile since you posted this but what is the full path of custom/http.conf ? Encountering this error right now and I do not have a custom folder, or an http.conf within my NPM data directory.

Edit: (Answer to my question above.)
The full location is ~/npm/data/nginx/custom/http.conf you will have to create the custom folder and http.conf file manually the first time if it's not already created.

<!-- gh-comment-id:1484032682 --> @FroggMaster commented on GitHub (Mar 26, 2023): > Create or edit the `custom/http.conf` file and add the following two lines; > > ``` > proxy_headers_hash_max_size 1024; > proxy_headers_hash_bucket_size 128; > ``` > > I have increased x2 over the defaults, you may choose other values that feel appropriate. I know it's been awhile since you posted this but what is the full path of `custom/http.conf` ? Encountering this error right now and I do not have a custom folder, or an http.conf within my NPM data directory. Edit: (Answer to my question above.) The full location is `~/npm/data/nginx/custom/http.conf` you will have to create the custom folder and http.conf file manually the first time if it's not already created.
Author
Owner

@dmzoss commented on GitHub (Jul 25, 2023):

It returns to me the same error and I insert the next configuration to the main nginx.conf file under /etc/nginx folder in the http scope

    proxy_headers_hash_max_size 1024;
    proxy_headers_hash_bucket_size 128;
<!-- gh-comment-id:1649728074 --> @dmzoss commented on GitHub (Jul 25, 2023): It returns to me the same error and I insert the next configuration to the main nginx.conf file under /etc/nginx folder in the http scope ``` proxy_headers_hash_max_size 1024; proxy_headers_hash_bucket_size 128; ```
Author
Owner

@Healzangels commented on GitHub (Aug 19, 2023):

I was just working to resolve this and was trying something similar to what you had been @dmzoss.
@FroggMaster Edit is the answer you're looking for where ever your /config has been mounted on the host will be a nginx folder. Mine contains things like directories: cache, dead_host, proxy_host.

In that location you'll want to create a new folder call custom like FroggMaster mentions above. Then with a http.conf with the two proxy _head lines also mentioned above.

Hope that helps!

<!-- gh-comment-id:1684796084 --> @Healzangels commented on GitHub (Aug 19, 2023): I was just working to resolve this and was trying something similar to what you had been @dmzoss. @FroggMaster Edit is the answer you're looking for where ever your /config has been mounted on the host will be a nginx folder. Mine contains things like directories: cache, dead_host, proxy_host. In that location you'll want to create a new folder call custom like FroggMaster mentions above. Then with a http.conf with the two proxy _head lines also mentioned above. Hope that helps!
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#260
No description provided.