Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my NGINX setup, when a url is too long, there seems to be an issue where it redirects the user back to the main page

Is there a setting in NGINX that I can alter that enables longer URLs ?

I'm thinking of this option below, but I'm not sure.

large_client_header_buffers number size

However the documentation doesn't really explain this option well.

share|improve this question
How long are your URLs? You'd need to get up into the thousands of characters before you start having issues. I don't think it's having an issue with your header length, as it would be sending a 414 response instead of a redirect if that were the case. Can you provide more details about the issue that you're seeing? – Shane Madden Jan 9 '12 at 19:32
@ShaneMadden The lenght of the urls are a little over 100 characters. I've checked the error logs and there isn't any kind of 414 error being displayed.The links look something like this knowledgebase/article/14/what-is-the-meaning-of-owner--group--and-everyone-in-t‌​he-permissions-panel-/ – Nick M. Jan 11 '12 at 17:38
up vote 2 down vote accepted

Alright guys (and girls?), After a long search I finally found out what this issue was being caused by.

There is a third party module that can be installed on php called suhosin. More information about the project can be found here

Anyway you need to open up your php.ini and find these following 3 line. If they do not exist then you need to create them with the proper variables

suhosin.get.max_name_length (default 64) (default 64)
suhosin.request.max_varname_length (default 64)

I hope this saves someone the trouble I had to go through to finally resolve! Enjoy!

share|improve this answer

You got it right probably. You need to up that from the defaults at large_client_header_buffers 4 4k/8k

If you are maxing out the buffer, there is a possibility nginx is just redirecting you to the index page. But the nginx manual says: if the client send a bigger header nginx returns error "Request URI too large" (414). Look in the logs to see what response you are getting. If you get the 414 then this is definitely it.

share|improve this answer
What would be a larger large_client_header_buffers? large_client_header_buffers 8 8k ? Does that look right to you? – Nick M. Jan 11 '12 at 17:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.