Invalid character found in the request target on Confluence behind nginx

Dung Tran Tien dung.trantien at
Mon Dec 10 06:43:13 UTC 2018

Currently I'm using Confluene 6.10.2 behind nginx. I have some pages with the page name including character '>' could not accessible, the error is:

HTTP Status 400 - Bad Request Type Exception Report
Message Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 org.apache.coyote.http11.Http11InputBuffer.parseRequestLine( org.apache.coyote.http11.Http11Processor.service( org.apache.coyote.AbstractProcessorLight.process( org.apache.coyote.AbstractProtocol$ConnectionHandler.process($SocketProcessor.doRun( java.util.concurrent.ThreadPoolExecutor.runWorker( java.util.concurrent.ThreadPoolExecutor$ org.apache.tomcat.util.threads.TaskThread$ Note The full stack trace of the root cause is available in the server logs.
Apache Tomcat/9.0.10

But when I access the page bypassing the reverse proxy, it's ok, so it could be a problem in nginx.
I read logs in Confluence and nginx, but did not find any strange, seen like the request this page has been drop by nginx, no record found out in backend log, please advise me how to fix the issue.

I tried with some solutions, like  ignore_invalid_headers to off in http level, also set rewrite , but no luck
if ($request_uri ~ ^(/.*)[>](.*)$) {
    return 301 $1%3E$2;

Dung Tran Tien
ICT Specialist

T +84.28.7109 1234, F +84.28.629 738 86, M +84 933 893 489

Ho Chi Minh Office:
Hai Au Building, 39B Truong Son, Ward 4, Tan Binh District, Ho Chi Minh City, Vietnam
106?39'51"East / 10?48'32"North<,%20106.664329+(Axon%20Active%20Vietnam)&iwloc=A&hl=en>

Da Nang Office:
PVcomBank Building, 30/4 Street, Hai Chau District, Da Nang, Vietnam
108?13'15"East / 16?2'27"North<,%20108.220597+(Axon%20Active%20Vietnam)&iwloc=A&hl=en>

Can Tho Office:
Toyota-NinhKieu Building, 57-59A Cach Mang Thang Tam Street, Can Tho, Vietnam
105?46'34"East / 10?2'57"North <'57.3%22N+105%C2%B046'34.3%22E/@10.0492503,105.7739993,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d10.049245!4d105.776188>

San Francisco Office:
281 Ellis Str, San Francisco, CA 94102, United States
122?24'39"West / 37?47'6"North<'05.7%22N+122%C2%B024'38.7%22W/@37.784913,-122.410747,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0?hl=en-US>

Luzern Office:
Schl?ssli Sch?negg, Wilhelmsh?he, Luzern 6003, Switzerland
8?17'52"East / 47?3'1"North<'01.0%22N+8%C2%B017'52.0%22E/@47.0502778,8.2955891,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0?hl=en>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list