Questions tagged [reverse-proxy]

A reverse proxy is a type of proxy server that fetches resources from a specific defined set of servers for a client. It is used in cases when there is an advantage to not exposing the web server with the content directly whether it be for security reasons or because of a lack of available public IP addresses.

A reverse proxy is a type of server. Unlike a traditional "forward proxy" server, a reverse proxy fetches resources from a specific defined set of servers for a client. The Apache HTTPD server's mod_proxy module is a popular example of software that can be used as a reverse proxy.

A reverse proxy can be used in cases when there is an advantage to not exposing the server with the content directly to the Internet, whether it be for security reasons or because of a lack of available public IP addresses.

3190 questions
5
votes
1 answer

Rewrite IIS served subdomain with content from other server/port

Our main web server is using IIS 6 and it obviously catches all port 80 traffic and we have another app served on a non-standard port (8443) that is hosted using Apache. For example: http://www.mydomain.com -> IIS6…
Reddog
  • 153
  • 5
5
votes
1 answer

Is it possible to configure HAProxy to choose a backend server based on a request's source IP? If so, how?

The title pretty much says it all. Basically, I want to route a request to a specific backend server based on the request's source IP. i.e., HTTP Request from 192.168.100.1 -> HAProxy -> BackendServer A HTTP Request from 192.168.100.2 -> HAProxy ->…
John
  • 536
  • 3
  • 5
  • 13
5
votes
1 answer

How do I DRY up this Nginx configuration?

I’m on Nginx 0.8.54 trying to achieve the following as DRYly as possible: Proxy straight to localhost:8060 if cookie no_cache is true or if request method isn’t GET. Otherwise serve static files from $document_root/static/$uri. If no such file…
freya
  • 153
  • 4
5
votes
1 answer

Getting correct SERVER_PORT to php-fpm through nginx and varnish

The goal is to get PHP aware of the correct web-facing server_port. The setup is: nginx on port 443 reverse proxying to varnish on port 80 reverse proxying to nginx on port 8008 and running php-fpm as a fastcgi. hitting 80 or 443 both work fine…
MDrollette
  • 325
  • 3
  • 12
5
votes
1 answer

Apache: Reverse proxy the whole domain

I asked the same question a while ago, but I guess I didn't put my question right. I'm trying to reverse proxy one whole virtual host domain to a subdirectory of another virtual host, something like this http://host2.com -> http://host1.com/host2.…
Neo
  • 265
  • 2
  • 6
  • 12
5
votes
2 answers

Forward differing hostnames to different internal IPs through NAT router

I have one public IP address, one router and multiple servers behind the router. I would like to forward differing domains (All using HTTP) through the router to different servers. For example: example1.com => 192.168.0.110 example2.com …
user10270
5
votes
2 answers

how to use nginx as a caching reverse proxy to replace squid/varnish

the following is our current setup on the apps but we would like to add nginx as a reverse proxy cache much like squid or varnish is it possible to edit this config to enable that caching behavior or do i need to add another nginx in front of this…
pylabs
5
votes
1 answer

Is it possible to use one haproxy process to load-balance more than one protocol/port?

I've got haproxy to work for us. But right now there are two haproxy processes running. One for HTTP and the other for TCP (RTMP). I've tried to configure both proxies in one configuration file but haproxy only handles HTTP then. My configuration…
Jan Deinhard
  • 2,383
  • 5
  • 26
  • 33
5
votes
2 answers

How can I set use mod_proxy_ajp with Apache and Tomcat?

I'd like to run Apache and Tomcat on an RHEL 5 server with Apache handling Ruby on Rails apps (through mod_rails/Passenger) and Tomcat handling Java apps. Under Apache, each Rails app will have a URL and vhost. The URLs are already configured in our…
Agvorth
  • 2,459
  • 4
  • 29
  • 29
5
votes
1 answer

Unexpected 301 redirects from Nginx when behind Nginx reverse proxy

Similar questions have been asked before here and here but none of them matched or solved the issue I am having. After a few hours of desperate problem solving I found a solution that was so unexpected yet simple that I wanted to share it in Q&A…
Akseli Palén
  • 191
  • 1
  • 7
5
votes
1 answer

Nginx reverse proxy + URL rewrite + websockets

I saw this Question, but it doesn't seem to work for me. Current (working) situation is: server { listen 443 ssl; server_name updates.example.com; ssl_certificate fullchain.pem; ssl_certificate_key privkey.pem; location…
ZioByte
  • 296
  • 4
  • 17
5
votes
0 answers

Intermittent proxy error in Apache: "Partial results are valid but processing is incomplete" with "AH01110: error reading response"

I'm using Apache 2.4.43 on CentOS 7.8 with Varnish 6 and PHP-FPM to serve a Magento 2 website. Varnish listens on port 80. Apache listens on 8080 to serve content to Varnish, and also port 443 which proxies HTTPS requests to Varnish like…
WackGet
  • 217
  • 4
  • 12
5
votes
4 answers

Keycloak blank page behind nginx reverse proxy

After unpacking and starting keycloak to listen on 127.0.0.1, I configured nginx to work as a reverse proxy accessible from a publicly available domain via https. This is the nginx configuration: http { server_tokens off; upstream keycloak…
user540468
  • 162
  • 2
  • 3
  • 10
4
votes
3 answers

NGINX Not Serving "Fast" Stale Content with proxy_cache_background_update

We are running NGINX in front of our backend server. We are attempting to enable the proxy_cache_background_update feature to allow NGINX to async updates to the cache and serve STALE content while it does this. However, we are noticing that it…
Ted Wilmont
  • 191
  • 5
4
votes
2 answers

nginx as reverse proxy with several domains & hosts

This question has probably been asked several times, but with all results I can find and my little knowledge, I'm kind of lost. I'm using Fedora 29. What I try to do with nginx : Use one let's encrypt ssl certificate with several domain names map…
EHRETic
  • 73
  • 1
  • 2
  • 5