Questions tagged [proxypass]

ProxyPass in Apache, and proxy_pass in nginx, are directives used to specify which backend or remote server should handle the incoming http request

ProxyPass in , and proxy_pass in , are directives used to specify which or should handle a given . This can be used to implement a , as well as a forward and/or transparent , too.


ProxyPass in :

https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass


proxy_pass in :

http://nginx.org/r/proxy_pass

http://ngx.su/src/http/modules/ngx_http_proxy_module.c#ngx_http_proxy_pass

681 questions
212
votes
11 answers

Nginx reverse proxy causing 504 Gateway Timeout

I am using Nginx as a reverse proxy that takes requests then does a proxy_pass to get the actual web application from the upstream server running on port 8001. If I go to mywebsite.example or do a wget, I get a 504 Gateway Timeout after 60…
Dave Roma
  • 2,449
  • 3
  • 18
  • 13
204
votes
10 answers

Setup nginx not to crash if host in upstream is not found

We have several rails apps under common domain in Docker, and we use nginx to direct requests to specific apps. our_dev_server.com/foo # proxies to foo app our_dev_server.com/bar # proxies to bar Config looks like this: upstream foo { server…
Morozov
  • 2,719
  • 2
  • 21
  • 23
133
votes
5 answers

How to add a response header on nginx when using proxy_pass?

I want to add a custom header for the response received from the server behind nginx. While add_header works for nginx-processed responses, it does nothing when the proxy_pass is used.
sorin
  • 161,544
  • 178
  • 535
  • 806
74
votes
7 answers

Nginx proxy_pass with $remote_addr

I'm trying to include $remote_addr or $http_remote_addr on my proxy_pass without success. The rewrite rule works location ^~ /freegeoip/ { rewrite ^ http://freegeoip.net/json/$remote_addr last; } The proxy_pass without the $remote_addr works,…
david.sansay
  • 1,329
  • 1
  • 12
  • 13
60
votes
7 answers

Set up an HTTP proxy to insert a header

I need to test some HTTP interaction with a client I'd rather not modify. What I need to test is the behavior of the server when the client's requests include a certain, static header. I'm thinking the easiest way to run this test is to set up an…
Logan
  • 1,884
  • 1
  • 12
  • 11
51
votes
2 answers

Nginx trailing slash in proxy pass url

I am using nginx to proxy pass to a NodeJS application. I'm trying to make the URL https://example.com proxy pass the request to http://example.com:8080/? Requests (from a mobile app) are requesting https://example.com// which nginx is making…
Pratyay Modi
  • 521
  • 1
  • 4
  • 4
46
votes
5 answers

apache ProxyPass: how to preserve original IP address

We are using ProxyPass to redirect all "/r" requests to jboss on port 18080 as follows: ProxyPreserveHost on ProxyPass /r http://localhost:18080/redirectService/ ProxyPassReverse /r http://localhost:18080/redirectService/ But, that causes the IP…
ashweta
  • 1,437
  • 3
  • 17
  • 19
32
votes
2 answers

Configure Apache with multiple ProxyPass

i am trying to configure my apache server as proxy to serve two internal services , one listening on 8080 and should receive traffic on specific URL and the other listening on 8077 and should receive all other http traffic I deployed and configured…
Qais Ammari
  • 1,211
  • 1
  • 11
  • 15
26
votes
5 answers

Ajp invalid message received with signature

I am using Tomcat 7.0.29 fronted with Apache 2.2.22 modproxy. Configured Ajp as the protocol in httpd.conf and AjpNioProtocol in server.xml. After the server starts, the logs are filled with the following message: Severe: Invalid message received…
Yasser
  • 575
  • 1
  • 4
  • 19
23
votes
3 answers

ProxyPass and DocumentRoot on one domain

Let's say I have the following configuration: # Server names, admins, logs etc... ProxyVia On ProxyRequests Off ProxyPass http://localhost:8080/tomcat-webapp/ ProxyPassReverse…
fracz
  • 20,536
  • 18
  • 103
  • 149
21
votes
1 answer

Nested locations in nginx

Hi I'm trying to get the following to work! I'm basically trying to allow the following URLs to be passed to the proxy_pass directive by either of these two URLS: http://example.com/admin/1 or http://example.com/admin/2/ I have the following…
geekscrap
  • 965
  • 2
  • 12
  • 26
21
votes
1 answer

ProxyPassMatch with ProxyPassReverse

Folks, We are trying to setup Apache reverse proxy for the following scenario: Incoming requests take the form http://foo.com/APP/v1/main.html For some servers the URL will reference a difference version, say, http://foo.com/APP/v2/main.html An…
Raj
  • 2,852
  • 4
  • 29
  • 48
21
votes
2 answers

https redirect for rails app behind proxy?

server declaration in my nginx.conf: listen 1.2.3.4:443 ssl; root /var/www/myapp/current/public; ssl on; ssl_certificate /etc/nginx-cert/server.crt; ssl_certificate_key /etc/nginx-cert/server.key; location / { …
20
votes
2 answers

Why does nginx proxy_pass close my connection?

The documentation says the following Sets the HTTP protocol version for proxying. By default, version 1.0 is used. Version 1.1 is recommended for use with keepalive connections and NTLM authentication. In my nginx config I have location / { …
user34537
19
votes
1 answer

malformed HTTP response with docker private registry (v2) behind an nginx proxy

I have setup a Docker private registry (v2) on a CentOS 7 box following their offical documentation: https://docs.docker.com/registry/deploying/ I am running docker 1.6.0 on a Fedora 21 box. The registry is running on port 5000, and is using an SSL…
Alex M
  • 235
  • 1
  • 3
  • 6
1
2 3
45 46