Questions tagged as ['reverse-proxy']

Under normal circumstances, when using proxy_cache_bypass
nginx will fetch a fresh copy from upstream, and overwrite the cached response with the new one.
But if the URL changes from a cacheable to a non-cacheable response (for example to a 4xx response with Cache-Control: no-cache
), then using proxy_cache_bypass
will indeed serve a fresh copy from upstream, but it will leave the old copy in the c ...
I'm trying to set up a VPS with a single IP address to run my static homepage and some additional services such as NextCloud. I already have a domain that points to the VPS's IP address. Reading through a number of tutorials on self-hosting, a common solution for this type of scenario is to set up a reverse proxy that forwards to different subdomains, e.g. nextcloud.mydomain.com. However, here's my ques ...

This is my nginx.conf
events {
}
http {
server {
listen 80;
rewrite_log on;
if ($http_x_forwarded_proto = "http") {
return 302 https://$host$request_uri;
}
location /.health {
return 200 'OK';
}
location /.status {
stub_status;
server_tokens on;
}
location ~ ^\/([^.][^\/] ...
I set up nginx as a reverse proxy for two proxied servers. Each of them (proxy and proxied servers) is running as a container in a docker environment. Proxied server appalpha
is simply an nginx:alpine
serving a static webpage (just for demo and testing purposes). All works fine here because things are simple.
The other proxied server's image is kanboard/kanboard
. When I try to access this service through ...

I'm trying to setup the following:
- docker container with nginx on localhost as a reverse-proxy for Wordpress, listening on localhost:80. It is also used as a reverse-proxy for other microservices.
- docker-compose container(s) with Wordpress+Apache, listening on localhost:4261. The docker-compose.yaml was taken from the official example. The 'ports' directive was changed from "8000:80" --> "4261:80".
nginx reverse proxy doesn't work with POST request returning 404 error
the rule is
location /mio-bff {
rewrite ^/mio-bff(.*)$ $1/ break;
proxy_pass http://mio-bff.cl-milugar:80;
proxy_redirect off;
}
and when try the URL with a POST request
https://milocation/mio-bff/pingfed/token
the response is 404:
{
"code": "ResourceNotFound",
"message": "/pingfed/token/ does not exist"
}
...
I currently use SNIProxy (it's the simplest I've seen so far to set up virtual hosts). However, I can only set SSL certificates separately per virtual host with each service's configuration (each one is on a separate port), which can quickly become a problem, and not for the server as a whole, so I only need a certificate for the reverse proxy. So, is there a way to do it? Alternatively, is there a reve ...
I'm using this configuration to nginx proxy reverso
location /backend {
rewrite ^/backend(.*)$ $1/ break;
proxy_pass http://credentials-web-bff.cl-milugar:5000;
proxy_redirect off;
}
and i don't have problem when Url like https://frontend/backend/mysite , but when the Url finish in "/" this rule didn't work.
can you guys help me ?
I have a setup where I have multiple service running with docker compose and one Nginx (nginx:1.19-alpine), which acts as a reverse proxy for all services and serves some static files.
One service is an Influxdb container (influxdb:2.1.0-alpine) which provides a UI for webbrowsers.
I want to reverse proxy to this container, but I get problems with the static files of this container.
This would be my rule ...
We are using ProxyPass and ProxyPassReverse to redirect traffic to our application. how can I setup a maintenance page when we are performing deployments.
Thanks

I am running a service on a docker container. The service is exposed on a given port (eg. 12345).
On top of it I added a nginx reverse proxy to get extra functionality like HTTPS and HTTP/2.
nginx configuration is the following:
worker_processes auto;
http {
sendfile on;
gzip on;
server {
listen 443 ssl http2;
listen [::]:443 ssl ipv6only=on http2;
...

This might be an easy one for experienced folks out there but I am stuck.
On a debian 10 machine, I got several containers running to serve a web application ✔
I also have a mailhog server to provide fake SMTP service. https://github.com/mailhog/MailHog/
Testing from the debian 10 machine with curl, mailhog is serving on 127.0.0.1:8025/mailhog/
as configured ✔
Outside my control and for securi ...

I have a case where I need to proxy pass a domain (domain1.com) to a different domain (domain2.com) hosted on a shared ip address (192.168.168.168), but domain2.com DNS is pointed other than the shared ip address, so domain2.com cannot be used as the proxy pass, only the shared ip address.
Since the shared ip address has multiple hostnames, is there a domain or hostname configuration option that ...

Nginx (19.x) is used as reverse proxy for nodejs
backend server (ubuntu). Here is the nginx conf file for reverse proxy:
server {
listen 80;
location /api {
proxy_pass http://127.0.0.1:5000; //proxy pass for nodejs backend server. Will it pass value of non-empty custom headers as well??
}
}
Both the client and backend server may set custom header for request and response. My understand ...
I have an nginx reverse proxy that I want to basically redirect any url request that isn't my specific top level domain to 404.
So far I think I want something like this at the bottom of my /etc/nginx/sites-enabled/site.conf
:
server {
listen 80;
if ($host != *domain.com) {
return 404 http://$host$request_uri;
}
}
but I don't know the exact syntax here. I already ...
We have the following:
- WordPress static website at
https://www.domain1.com
. - React/Django Web application at
https://www.domain2.com
with three main URIs:/
/admin
/api
We would like them to appear like they are the same domain at https://www.domain1.com
. I was told this could be done by setting up a Reverse Proxy on the Apache web server that is at https://www.domain1.com
. Due to this we'd ha ...
I recently uninstalled apache2 for Nginx I'm trying to listen on 88, 808 and 888 for my sites and redirect different subdomains for each (and another domain to another server). the problem is that Nginx is giving bad gateway for all proxied requests and timeout for the direct ip access.
proxy conf : --> otherdomain.fr = eror 502 bad gateway
# HTTP
server {
# Listen on ipv4
listen 80;
#lis ...
I use ubuntu 20.04 with portainer and nginxproxymanager to host my apps. Some are still being hosted bare metal but I am planning to transfer all to docker soon enough.
But the problem is ufw, which I have been using does not integrate with docker apps. The set up is:
portainer - docker compose/stacks - nginxproxymanager - Gateway IP with its web UI port - subdomain name and ssl.
- once ufw is up, ...
I am having difficulty getting Wiki.js hosted on my server.
My current setup is using Docker Compose utilising a reverse proxy with the eventual aim to host some services for personal use. I have successfully managed to host Portainer (using a guide). And I can host Wiki.js in its own docker container (via Docker Compose), but adding the service together is failing with a 502
error. Portainer is stil ...

it's very hard to find something on google - you get too many results from nginx and proxy alone.
so we have a nginx-docker-container which delivers some static files and should talk to a backend-server on specific locations. we gave http_proxy and https_proxy per docker-compose into the environment of the container
trying the connection with curl results in success - its because of the http_proxy/h ...
I'm trying to secure containers on my homelab.
The main goal is:
- isolating nginxA and nginxB, so they are not able to talk to each other via
172.17.0.1
(eg. preventing nginxA from reaching nginxB via172.17.0.1:5001
) - isolating nginxA and nginxB from localhost, making them exclusively accessible via traefik
- Allowing nginxA to talk to nginxA_DB, which are in the same stack, but without allowing other cont ...
I have set up a postgres database container and can connect and query it directly using its published port 5434.
The goal is to deploy the test database later and access it via nginx reverse proxy. I don't know what is the best way to connect to a deployed test database. Please advise.
I have tried to connect to a postgres database via nginx reverse proxy using local containers.
Using command:
psql -h lo ...
I'm trying to proxy websockets through Apache 2.4. I found an online demo, and this is my config based off of it. I'm running an app that uses websockets on port 8089 and am using apache to proxy the site and the app.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerAlias mysitehere
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
Re ...
I am using Grafana on a server that does not have Internet, I need to send Telegram notifications, for that I am using Nginx server in another machine.
Server A:
- Grafana installed / Running on port 3000.
- Grafana url: www.example.grafana.com
- IP of the server (example): 10.16.216.122
- It uses this webhook to send telegram messages: api.telegram.org
- I also configured /etc/hosts to send that notifications to ...
Failed to establish a secure connection to *ip-address*
The system returned:
(104) Connection reset by peer (TLS code: SQUID_ERR_SSL_HANDSHAKE)
Handshake with SSL server failed: [No Error]
This proxy and the remote host failed to negotiate a mutually acceptable security settings for handling your request. It is possible that the remote host does not support secure connections, or the proxy is no ...
The server:
I use Nginx as a ingress-proxy for my server. Nginx runs within a Docker container.
docker-compose.yml:
nginx_ingress:
image: nginx:latest
ports:
- "80:80"
- "443:443"
networks:
front-tier: {}
back-tier:
ipv4_address: 172.28.1.1
restart: always
volumes:
- /var/lib/my-server/config/nginx_ingress:/etc/nginx/conf.d
- /var/li ...

I am trying to run haproxy in docker by following this article from the haproxy blog. https://www.haproxy.com/blog/haproxy-on-docker-swarm-load-balancing-and-dns-service-discovery/
I am getting the following error Cannot chroot /var/lib/haproxy
hap_haproxy.3.j24pbth7qsup@prox1 | [NOTICE] (1) : New worker #1 (9) forked
hap_haproxy.3.j24pbth7qsup@prox1 | [NOTICE] (9) : haproxy version is 2.4.7-b5 ...

First, I apologize if this isn't the right forum as this is somewhat of a networking question.
To give a brief explanation of what I want to achieve is basically have the services or apps provided by Synology be accessible via a simple URL without port numbers. I have a dedicated IP address, so I don't have to worry about setting up DDNS.
I thought all I would need to do is setup a very small NGINX s ...

I'm trying to set up a reverse proxy to my api server but getting a 404 error page.
Context: Whilst setting up a react.js application and trying to find a solution to the CORS problem, I've decided to use reverse proxy (proxy pass) with nginx to invoke the api server internally and trick the browser to think the api is on the same domain.
This is my intended setup:
https://example.com points to the websit ...

I want to allow people to access a webserver located on acomputer in my LAN buy my ISP does not allow me to open any ports. I have a website hosted on a shared hosting that allows ssh access. Is there a way to tunnel via SSH and allow people to get into my LAN webserver from the shared hosting site? Both are ubuntu servers.