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

I have to configure a Nginx server wich will be used as http(s) proxy and caching like a Apache server with proxy_pass and proxy_pass_reverse directives.

The system will be like this : The nginx server respond to requests. If I type, the nginx server have to proxy_pass on the internal adress (exemple : It's the same thing for other services (like If I navigate on redmine, the URL will be[...] It's like using multiple proxy_pass and proxy_pass_reverse directives on a apache vhost.

I have troubles with sites like Redmine because if I click on a link on Redmine, redirect on and that makes a 404 error (the webpage is searched on the nginx server). If I type directly it works.

How can I fix this problem ? Thank you


This configuration don't works for me. For example, I tried :

location /pma {

The login page is loaded correctly but when I try to log on, my browser open this link:[...] and gets a 404 error.

share|improve this question

The proxy_redirect directive can be used to modify redirects sent by backend servers. Based on your description of the behaviour, you need the following configuration:


Try this for phpMyAdmin:

share|improve this answer
Added suggestion for phpMyAdmin. – mgorven May 24 '12 at 4:44
It don't works but when I try to log on, it sends me to[...] with the login page again and if I try to log on again, I get the 404 error with[...] – user122183 May 24 '12 at 5:57

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.