Questions tagged [proxypass]

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

ProxyPass in , and proxy_pass in , are directives of the default module that are used to specify which or server should process the .


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

578 questions
10
votes
1 answer

Nginx proxy_pass root and specific url only

Working on a new version of an existing web app, I need nginx to forward root (/) and multiple specific URI to be forwarded to the v2 infrastructure (with proxy_pass) while not specified URI must be forwarded to v1. location = /specific_uri1 …
cyrilv
  • 325
  • 2
  • 3
  • 12
9
votes
4 answers

NGINX proxy_pass with URI modification

I need to pass some requests to proxy (running GlassFish) with removing one section of url. For example: https://xxx.net/jazz/MobileApi?id=2&make_id=4 Should be passed to proxy as: http://X.X.X.X:8080/MobileApi?id=2&make_id=4 I have following…
Andrey
  • 193
  • 1
  • 1
  • 6
9
votes
1 answer

Nginx dynamic proxy_pass doesn't resolve properly

I'm having problems configuring nginx, I've searched the web for solutions and I have some bits and pieces but I'm still not able to come up with proper configuration. I have registered a domain, let's say - www.example.com. I've configured…
Stugal
  • 203
  • 1
  • 2
  • 4
9
votes
2 answers

Apache ProxyPass ignore static files

Having an issue with Apache front server connecting to a Jetty application server. I thought that ProxyPass ! in a location block was supposed to NOT pass on processing to the application server, but for some reason that is not happening in my case,…
virtualeyes
  • 675
  • 3
  • 12
  • 28
9
votes
1 answer

Apache ProxyPass or ProxyPassMatch to exclude a file from proxying

I have a VirtualHost set to proxy all requests to another server running on port 9000. What I have : ProxyPass / http://localhost:9000/ ProxyPassReverse / http://localhost:9000/ What I've tried : ! ProxyPass /test.html…
Andrei
  • 463
  • 2
  • 5
  • 12
8
votes
2 answers

NGINX Dynamic Port proxy_pass

I need a way to proxy_pass a dynamic port through the location's URL. The proxy has the same IP but the port changes since the servers are created via docker on random port numbers. (Too many for me to add manually) I need a way to proxy_pass these…
Cory Fail
  • 183
  • 1
  • 6
8
votes
1 answer

ProxyPass a WebSocket connection to a UNIX socket

In Apache 2.4 you can reverse proxy an HTTP connection to a local Unix socket with: [1] ProxyPass unix:/path/to/app.sock|http://example.com/app/name You can reverse proxy a WebSocket connection to a local TCP socket with: [2] ProxyPass…
Kijewski
  • 191
  • 1
  • 8
8
votes
2 answers

Redirect traffic based on url to different ip address maintaining port and url information

We have a QA version, a UAT version, and a DEV version of webapp. Users need to access these via http://uat.company.com:41002/webapp, http://qa.company.com:41002/webapp, and http://dev.company.com:41002/webapp. There is also a different webapp on…
Mitch Kent
  • 261
  • 1
  • 2
  • 11
8
votes
5 answers

How do I smoothly migrate a web server's DNS from one IP address to another?

I currently have a domain name registered for a Linux/Apache server that I am going to replace with another on a new IP address. Migrating the data will be relatively quick and a 5 minute disruption during that process is acceptable. The DNS…
Tom
  • 2,652
  • 1
  • 20
  • 12
7
votes
2 answers

In Apache how to define multiple ProxyPass to different servers with the same context-root?

** updated with workaround at bottom of this answer ** I have a requirement for my webapp to proxy to 2 external reporting servers. So I will have a menu-item for each external reporting server. But the browser-URL has too look like it's my server…
gotjee
  • 89
  • 1
  • 1
  • 5
7
votes
1 answer

Issues with ProxyPass and ProxyPassReverse when proxying to localhost and a different TCP port

I am attempting to use ProxyPass and ProxyPassReverse to proxy requests through Apache to another server instance that is bound to the localhost on a different TCP port that the Vhost exists (VHost is bound to :80, when the target is bound to…
brandeded
  • 1,845
  • 8
  • 32
  • 50
7
votes
4 answers

REMOTE_USER through Apache reverse proxy

I have an Apache webserver with mod_proxy enabled and a Virtualhost, proxy.domain.com. This proxy is configured to prompt the user for credentials with AuthType Basic. Then, the content of web.domain.com is available through the proxy with ProxyPass…
Laurent Nominé
  • 567
  • 1
  • 5
  • 16
6
votes
1 answer

Nginx: Forcing upstream server to log proxy server's request id instead of it's own request id

I've setup a proxy server that forwards client requests to an upstream server which works fine so far. However, the issue I am trying to solve is that forcing upstream server to log the request id of the proxy server. Is this possible? Just to let…
BentCoder
  • 331
  • 6
  • 21
6
votes
1 answer

Nginx variable in proxy pass does not work

Can proxy_pass work with variables? I am trying to make the below configuration work: http { ... map $http_user_agent $myvariable { default 'mobile'; } ... } The location configuration:…
Syed Osama Maruf
  • 103
  • 2
  • 2
  • 9
6
votes
0 answers

nginx proxy_pass one file

I have a single file that I want to appear to host but that I don't. So I write this in my nginx server block: location /d-p27.js { proxy_pass https://data.example.com/p/piwik.js; } After reloading nginx's config, when I test this with curl -I…
jma
  • 425
  • 6
  • 16
1
2
3
38 39