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

Filter by
Sorted by
Tagged with
7 votes
1 answer
3k views

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 ...
BentCoder's user avatar
  • 341
2 votes
1 answer
48 views

How to force non-www -> www routing for subfolders in Nginx?

My site is SSL-enabled and is called schandillia.com. And my objective is to force all access through https://www.schandillia.com...both for the homepage, as well as other pages. Following is what my ...
TheLearner's user avatar
0 votes
1 answer
375 views

Any way to reduce redundant location block codes in Nginx config?

Is it possible to DRY a bunch of location blocks in Nginx with the exact same configuration, just different routes? Take a look at the following snippet off my Nginx .conf, for instance: location / { ...
TheLearner's user avatar
3 votes
1 answer
4k views

Unable to serve NextJS static assets through Nginx

I have a NextJS app running on port 3000 and I have a test.ico file located at the following location: /static/images/icons/ I want this file to be served off the root rather than the actual path. I ...
TheLearner's user avatar
2 votes
1 answer
3k views

Howto traefik->keycloak gatekeeper->service?

My question is: Specifically, how do I configure traefik to double proxy through keycloak gatekeepr to authenticate my services as outlined below? I know my authentication chain looks like the ...
Karl N. Redman's user avatar
1 vote
1 answer
1k views

nginx multiple http/https proxy domains

I have a server that is going to host many sites, but right now there are just two. site1 (http://site1.com) is http and site2 (https://site2.com) is https. Both of these sites are node.js based and ...
Shan Robertson's user avatar
0 votes
0 answers
464 views

Combining local static folders and proxy-pass on Nginx

I am trying to setup an Nginx server (Centos 7) as front-end proxy server to a live server running Apache. (When its working, I will make the proxy server the live server). I have basically got it ...
Jon Harris's user avatar
0 votes
0 answers
187 views

NGINX Apache Setup Won't Run Apache Functions

I've set up NGINX in front of Apache to pass requests to. For one of my subdomains, I've made it so the traffic goes through NGINX and then through Apache, as the PHP system on this subdomain requires ...
Noah Sinist3rSaint's user avatar
0 votes
0 answers
3k views

NGINX proxy pass can't find static files

I am trying to host my website and CMS on the same Ubuntu server and am trying to access them both, but I am struggling with the configuration. The website is currently a simple HTML page, and the CMS ...
sandervspl's user avatar
0 votes
1 answer
795 views

X-Accel-Redirect resume broken download

I am using Nginx X-Accel-Redirect to serve a large protected file (several GBs) to users. The server application processes the URL and verifies the download token (embedded in URL) and starts or ...
user2956979's user avatar
0 votes
0 answers
4k views

apache proxy pass returning 403 forbidden

I wanted to add VirtualHost to an existing apache 2.4 reverse proxy running on centos 7, but I encounter a problem resulting in error 403. I have the following VirtualHost Setup <VirtualHost *:80&...
Kenny Blankenship's user avatar
0 votes
0 answers
5k views

Apache: "pass request body failed" due to client uptime

I have a Rest API built in Python that is served by gunicorn in a docker container behind an Apache proxy which handles SSL. Requests to that API are made from Python on a Windows 10 machine using the ...
wonkypie's user avatar
1 vote
2 answers
3k views

Apache proxypass exclude rule being ignored

I've been scratching my head on this for far too long. I have what I consider a simple configuration using the proxypass rules for Apache, I want to supply a list of exclusions before using a '...
Steve Spencer's user avatar
1 vote
0 answers
1k views

Haproxy ProxyPass and ReverseProxy

I have an Apache vhost with the following directives ; ProxyPass "/String1" "http://10.0.1.50:8081/String1/String2/String3 ProxyPassReverse "/String1" "http://10.0.1.50:8081/String1/String2/String3" ...
angry_guy45's user avatar
0 votes
0 answers
42 views

Apache2 Forward and Reverse Proxy

I have a web server and some load balancers, to avoid exposing the external IP's of the LB's I wanted to install a Ubuntu Apache2 (doesn't have to be) based Proxy. I want it to: Client ---> Domain --->...
Tom's user avatar
  • 1
0 votes
0 answers
734 views

Should NGINX resolve proxy_pass from localhost?

I'm newbie in nginx, please help. Here is my simple config: server { listen 80; server_name kama.com.local; location / { proxy_pass http://localhost:7565; proxy_http_version 1.1; ...
Vladimir's user avatar
  • 135
0 votes
1 answer
373 views

nginx proxy pass forward subdirectory & preserve url

I have setup two servers with nginx - https://dev.imagecompressor.io at 35.231.119.158 https://imagecompressor.io at 176.9.41.138 I am trying to forward https://imagecompressor.io/site to https://...
A G's user avatar
  • 163
0 votes
1 answer
225 views

Apache proxypass not retrieving the expected content

Have been trying to get an apache proxy set up to serve all content in a sub directory from a new application server If I use this rewrite rule it works and I get redirected to the new site ...
Jameel's user avatar
  • 79
1 vote
1 answer
7k views

Nginx Proxy Pass - Return Status code form upstream site

How do I return the HTTP STATUS CODE from the http://127.0.0.1:8080/ Example: http://127.0.0.1:8080/api/example returns a 500 then when accessing ttp://127.0.0.1/api/example it should also return ...
X3R0's user avatar
  • 115
2 votes
0 answers
576 views

Drupal / nginx redirect domain without changing URL with proxy_pass

We have a Drupal 8 website which runs about 18 languages, but only the Chinese one has a separate domain. We want this domain, which for testing purposes is testchinese.com to redirect in the ...
Illes Peter's user avatar
1 vote
1 answer
2k views

nginx throws cannot get / bad gateway when trying to connect to proxypass path

I created a proxypass on my nginx server, and enabled ssl on it, but with and without ssl I still get an error saying 502 bad gateway. What can I fix to resolve this?(p.s. when I use curl on localhost ...
Jake t's user avatar
  • 127
2 votes
1 answer
863 views

Proxy_Cache on NGINX Reverse Proxy and FastCGI_Cache on Upstream NGINX Wordpress Server

I have some questions about caching implementation since most of the resources I have found don’t seem to distinguish between NGINX as a reverse proxy or as a “native” web host. I’ve setup a ...
StudentDeveloper7's user avatar
3 votes
0 answers
8k views

Using Environment variable in proxy_pass nginx

I have nginx container where I want to forward an api call to another server. I want to pass in environment variables from Docker Compose to be able to change sites, without rebuilding the Docker ...
ChrKong's user avatar
  • 31
1 vote
0 answers
267 views

Can you conditionally handle proxy_redirect on NGINX?

I was having issues with requests like https://example.com/blog/blog-post being sent to upstream but then 404'ing at https://example.com/blog-post/. The issue was the upstream server (Wordpress) was ...
Adam M.'s user avatar
  • 23
1 vote
1 answer
224 views

NGINX proxy_pass setup fails when adding a location for expiring file types

When adding the following to my Nginx config server block, the /blog/ location starts 404'ing all file types referenced. What is the correct way to leverage the expires directive and continue to keep ...
Adam M.'s user avatar
  • 23
0 votes
1 answer
272 views

Apache destination virtual host certificate when using mod_rewrite or ProxyPass

I am trying to use mod_rewrite or ProxyPass to redirect (PT) the client's request from virtual host A on 443 to different virtual host B on port 4434, also with SSL. Like that: SSLProxyEngine on ...
Uri Gorobets's user avatar
0 votes
1 answer
7k views

How to remove the path with an nginx proxy_pass in http and https?

I have read the similar issue below but got a problem that will explain later in the question: How to remove the path with an nginx proxy_pass I have a config like below that proxy_pass to an ...
Alireza's user avatar
  • 613
0 votes
0 answers
847 views

Nginx is not passing request to App server in case of => special character in URL

I have strange problem, I have special characters(=>) in URL which is more of business requirement(sorry, so I can't change it). Here is specific scenario- I'm using nginx as web server and proxy ...
Red Boy's user avatar
  • 101
0 votes
1 answer
2k views

Apache proxy redirect URLs with specific string

I have a server which runs 2 applications. I am using a public IP address and I want to parse the url in a way if a specific text occurs the call is redirect to a specific port. In my case I want that ...
Simone Ceccolini's user avatar
0 votes
1 answer
1k views

Proxy pass in http.conf apache not forwarding

I'm currently trying to forward this url https://example.com/screenshot to http://localhost:8443 the reason why I'm trying to do this is because I have an express js server running that I need to be ...
FabricioG's user avatar
  • 167
4 votes
1 answer
44k views

Nginx proxy cookies not set

Here's my situation, I have a Rails 4 app that can be accessed by multiple domains, depending on the domain, the content changes. Say the main domain is domain1 and all the other domains just use ...
Julien's user avatar
  • 252
0 votes
1 answer
5k views

ReverseProxy Wildcard?

Is it possible to have a wildcard for a reverse Proxy using ProxyPass? I've seen similar config below for ProxypassMatch, so I tried to model it off of that using just proxypass ProxyPass ^/...
POPEYE1716's user avatar
6 votes
1 answer
15k views

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'; } ...
Syed Osama Maruf's user avatar
39 votes
5 answers
78k views

How to handle relative urls correctly with a nginx reverse proxy

Sure I'm not the first one that tried to serve a domain example.com from a example.net/bbb, but I haven't found a solution yet. My NGINX configuration follows the guidelines and looks something like ...
a.barbieri's user avatar
-1 votes
1 answer
6k views

Apache server - Unable to locate CSS and JS files

I want that when i hit URL A, it should serve content from URL B but the URL on the address bar should keep pointing to URL A only. URL A: http://apps.company.com/lab URL B: http://svrdev-73:6020 ...
Technext's user avatar
  • 147
2 votes
1 answer
4k views

Apache 502 Error With Upstream Proxy Raising 413

We have a Python Flask API running in gunicorn being fronted by apache. ProxyPreserveHost On <Location /api/v2> ProxyPass http://127.0.0.1:8090/ disablereuse=on SetEnv proxy-sendcl </...
mmcclannahan's user avatar
1 vote
1 answer
2k views

Apache mod_cache cache misses

Somehow I can't get Apache's mod-cache to work as I want. I want it to cache a proxy call to my tomcat server which is a jsp file. The jsp file displays the current time so I can notice if I get a ...
user2908112's user avatar
2 votes
1 answer
2k views

Rewriting client "Host" http header before nginx validates the field

I get following request from a device and should proxy it to hd10.vtech.com: GET http://hd10.vtech.com/test/pp_firmware/HD10-CH010_SUOTA.bin HTTP/1.1 Host: http://hd10.vtech.com/test/...
gspoosi's user avatar
  • 131
1 vote
1 answer
1k views

Nginx avoid removing double trailing slash in path param when proxy pass

I have config in my nginx: location /image-optimizer/ { proxy_pass http://192.168.1.20:80/; } The problem is when nginx proxy passes it removes double trailing slash in path ...
Eazy's user avatar
  • 190
3 votes
1 answer
7k views

nginx set directive not working

I'm facing the same issue as described in How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass? and thus wanted to apply the same solution. My NginX, version 1.15....
ThomasVdBerge's user avatar
0 votes
0 answers
96 views

Is it possible to exclude a directory with ProxyPassReverse?

I'm looking to exclude a directory from a site is behind a reverse proxy. examples I'm seeing are using ! , but I haven't been able to solve this See examples that I've tried below. Legacy system ...
POPEYE1716's user avatar
2 votes
0 answers
7k views

Nginx, with multiple forwarded domains and a letsencrypt certificate

I'm trying to set up Nginx as a forwarding proxy for all the dev servers sat behind my static IP. Iv'e read this Question: Lets Encrypt with an nginx reverse proxy Already, and it get's me part of ...
shawty's user avatar
  • 303
0 votes
0 answers
926 views

Nginx proxy_pass to wordpress blog

I'm trying to serve a wordpress blog from another domain using proxy_pass. https://blog.domain.example/ to https://domain.example/blog I clearly also want to rewrite all the urls accordingly. What ...
ngw's user avatar
  • 1,291
7 votes
0 answers
11k views

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 ...
jma's user avatar
  • 445
0 votes
0 answers
1k views

Shorten URL with Nginx

I have this long URL with http://shortk8s.com/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/#!/workload?namespace=default I'd like to http://shortk8s.com to go directly ...
Proximo's user avatar
  • 101
4 votes
4 answers
20k views

apache reverse proxy with SSL gives '400 bad request'

I have an Odoo instance running on port 9069 in an Ubuntu server. Right now, apache is listening on port 8069 and is proxypass-ing this to 9069 (which works fine). The working URL is http://example....
Kishor N's user avatar
1 vote
1 answer
580 views

How to handle session id from expressjs behind a apache2.4 webserver

I have a apache 2.4.29 with TLS activated to handle static files. Then i have a proxy configured to pass dynamic content to a NodeJS 10.5.0 with: ExpressJS 4.16.3 express-session 1.15.6 session-file-...
Kaf's user avatar
  • 179
5 votes
1 answer
6k views

Configuring multiple ProxyPassReverseCookiePath in Apache HTTP

I have a server with an Apache reverse proxy in front. The server machine contains 2 web applications running under: localhost:8000/app and exposed as my.url.com/app1 localhost:8001/app and exposed ...
PentaKon's user avatar
  • 211
1 vote
1 answer
2k views

Apache: resources not loaded after a redirect with proxypass

Configuration: One virtual machine with Docked installed (10.10.10.68) One Docker container for myapp with apache installed (10.10.10.68:8080) A second docker container with superset installed (10....
wawanopoulos's user avatar
0 votes
1 answer
3k views

ProxyPass changes 304 status to 200 and adds content-type

The probelm I am running a node server (sqlpad) through an Apache2 reverse proxy. On some requests, the node server returns a 304 status code with no Content-Type when accessed directly. However, ...
Tom Aranda's user avatar

1
3 4
5
6 7
12