Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Nginx changes my server's behavior. My configuration file is the following:

server {
  server_name XXX ;
  location / {
    proxy_pass http://127.0.0.1:8080 ;
  }
}
server {
  listen 443;
  # ssl parameters
  server_name XXX ;
  location / {
    proxy_pass https://127.0.0.1:8081 ;
  }
}

My server answers a page showning the url requested. When I try http://XXX/a+b, the '+' is turned into a ' ' (space character), not when I try https://XXX/a+b And to be sure that it comes from nginx, I tried with https://127.0.0.1:8081/a+b and http://127.0.0.1:8080/a+b, they both show the '+'.

How can I specify in nginx configuration not to decode/encode urls ?

share|improve this question

migrated from stackoverflow.com Jul 12 '11 at 15:57

This question came from our site for professional and enthusiast programmers.

To properly pass a literal + symbol through a URL, you must encode it as %2B.

I don't see anything in the proxy_pass documentation allowing you to tune the URL encoding.

share|improve this answer

Your Answer

 
discard

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