37 votes
Accepted

Nginx reverse proxy redirection

Do not set proxy_redirect to off, that is not doing what you think it is doing. proxy_redirect performs something similar to URL rewriting, for example: location /sales/ { proxy_pass http://...
grochmal's user avatar
  • 8,667
21 votes
Accepted

Why is the Nginx webserver called a "reverse proxy"?

A typical "forward" proxy (commonly just called "proxy") is used to allow internal clients to reach out to external sites. For example, a corporation may have desktop users who want to reach the ...
Stephen Harris's user avatar
10 votes

Why is the Nginx webserver called a "reverse proxy"?

Why is the Nginx webserver called a "reverse proxy"? "Reverse proxy" refers to a specific function that a specific Nginx instance can take on. Other Nginx instances can be ordinary web servers, or ...
Adrian's user avatar
  • 2,546
9 votes

CentOS 7 httpd failed to make connection with backend

To fix this, first test by setting the boolean dynamically (not permanent yet): /usr/sbin/setsebool httpd_can_network_connect 1 If that works, you can set it so that the default policy is changed ...
Ramon R.'s user avatar
4 votes
Accepted

NginX client cert authentication fails with "unable to get issuer certificate"

Problem solved. I'll post the reasons and the solution for the slight possibility that it might help someone else: The first error (verify error:num=2:unable to get issuer certificate) resulted ...
Marlon's user avatar
  • 226
4 votes

Can you configure NGINX to redirect a HTTP request to SSH connection?

This is a good question. Yes you can use nginx to redirect SSH traffic. In the following example, nginx will redirect traffic, according to protocol. This means that nginx is able to identify SSH ...
Bruce Malaudzi's user avatar
3 votes
Accepted

How to add X-Forwarded-for header in reverse proxy with SSL passthrough

What you show is not SSL passthrough, but SSL termination at the reverse proxy and from there another HTTPS connection to the final server. According to the documentation this will automatically add ...
Steffen Ullrich's user avatar
2 votes
Accepted

Opposite behavior of keepalive (nginx reverse proxy on ElasticSearch)

You have defined an upstream container called elasticsearch. But you do not invoke it. Try replacing your proxy_pass directive with: proxy_pass http://elasticsearch; See this document for details.
Richard Smith's user avatar
2 votes
Accepted

NGINX - location {} slug with different root domain

Attempting to use root with a sublocation will mean that it's going to try $root$uri, which in your case becomes /opt/site3/site3. You can do what you did and use root so that the root directory is a ...
Thomas Ward's user avatar
  • 2,718
2 votes

Redirect request to corporate proxy server with nginx reverse proxy

This is the reverse proxy you are looking for. http { ... upstream my_proxy { server my.proxy.com:1234; } server { listen 8080; location /path { ...
Germán Faller's user avatar
2 votes

Connection errors on Apache httpd proxy, but only for some vhost

You should be able to see something in the Apache error log for the failed requests if the problem is in the config. Usually they are at /var/log/apache2/error.log or somewhere similar. Timeouts ...
Chris Gilbert's user avatar
2 votes
Accepted

Multiple ssh servers in the same machine and proxy to redirect depends of the domain

That is not possible this way: The IP address of the domain names is looked up first, and if both a.dom.com and b.dom.com map to the same IP address, the packets that arrive at the reverse proxy will ...
dirkt's user avatar
  • 32.4k
2 votes

How to send CTRL+c special char to interactive bash over tcp socket?

I'm not sure if this is what you were looking for, but you can background the netcat process (hit CTRL+Z), type stty raw -echo and then resume the process. Now it should work.
Țurcanu Ștefan's user avatar
2 votes
Accepted

RTP Reverse Proxy

RTP is used in conjunction with the RTP Control Protocol (RTCP). While RTP carries the media streams (e.g., audio and video), RTCP is used to monitor transmission statistics and quality of service (...
Rasool Ziafaty's user avatar
2 votes
Accepted

How to NGINX reverse proxy to backend server which has a self signed certificate?

Your 443 server block is not configured for SSL requests. You need to add ssl to the listen directive and configure ssl_certificate and ssl_certificate_key. E.g. server { listen 443 ssl; ...
iinuwa's user avatar
  • 136
2 votes

Apache Reverse Proxy - How To Set Up Single Domain To Multiple IPs

You're almost there. You're testing with https://mydomain.com/nextcloud but you need to test with https://mydomain.com/nextcloud/ (note the trailing slash). The reason for this is that because there's ...
Chris Davies's user avatar
2 votes

Apache Reverse Proxy - How To Set Up Single Domain To Multiple IPs

Apache's configuration will be highly dependent on the web application being proxied. You may need additional directives if the webapp uses websockets, for instance, something that is pretty common ...
Hermógenes Oliveira's user avatar
2 votes
Accepted

Do unix domain sockets support reuse?

One of your linked answers directly quotes the apache documentation for mod_proxy_fcgi. According to the answer it states: UDS does not currently support connection reuse But this phrase no-longer ...
Philip Couling's user avatar
2 votes
Accepted

RewriteRule overrides ProxyPass

Figured it out. Just add [P] to the rewrite rule and it start to behave as reverse proxy ProxyPass /mediaproxy http://127.0.0.1:9001/mediaproxy ProxyPassReverse /mediaproxy http://127.0.0.1:9001/...
sanjihan's user avatar
  • 405
1 vote
Accepted

nginx re-direct to API server in EC2

You forgot a slash at the end of location /pyserv/ :)
dgan's user avatar
  • 264
1 vote

mDNS Services are not reachable in fritzbox network

mDNS uses a local Link Multicast IP Adresse (IPv4: 224.0.0.251, IPv6: ff02::fb, UDP-Port 5353) with TTL fixed to 1, so not to be routed. You need a mDNS proxy annoucing the service and the target IP ...
Michael Baumert's user avatar
1 vote
Accepted

Apache Reverse proxy SSL issues

Forget to add solution. Here it is after time. TimeOut 10000 SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off SSLProxyCheckPeerExpire off RewriteEngine on ...
Delirium's user avatar
  • 378
1 vote
Accepted

How to configure a free FQDN (Fully Qualified Domain Name) for local usage?

Use /etc/hosts man 5 hosts for further information. It is used before DNS lookup to find a hostname's IP address.
X Tian's user avatar
  • 10.5k
1 vote

Access to webserver behind nginx reverse-proxy from outside fails with SSL handshaking error

proxy_pass http://172.16.1.51:443; Since the specified protocol is http:// This tells nginx to access the server at port 443 with plain HTTP. Given that the server at this port is configured with ...
Steffen Ullrich's user avatar
1 vote

ProxyPass on Nginx not working as expected

So after some more investigation and looking at the nginx logs, it turns out it was a SELinux issue. Following the steps at http://alfredoroca.github.io/nginx/selinux/2017/03/13/Allowing-Nginx-to-use-...
DamianJ's user avatar
  • 21
1 vote

nginx reverse proxy + static files

Working solution: server { error_log /var/log/nginx/error.log debug; listen 80; server_name ${NGINX_HOST}; sendfile on; tcp_nodelay on; root ...
Moshe's user avatar
  • 322
1 vote

Redirect on the same port from http to https with nginx reverse proxy

In order to use Apache as a Reverse Proxy, make sure you have modules mod_proxy and mod_proxy_http enabled in your server (e.g. sudo a2enmod proxy_http). Add ProxyPass and ProxyPassReverse to the ...
Freddy's user avatar
  • 25.6k
1 vote
Accepted

Bypass Apache Authentication for specific IP

No, don't add a second <proxy *> block, as it will conflict with the first one. Instead, change your existing <proxy *> block to this: ## Custom fragment <proxy *> ...
telcoM's user avatar
  • 97.1k
1 vote
Accepted

Apache httpd reverse proxy returns SSL_ERROR_RX_RECORD_TOO_LONG when HTTP redirects to HTTPS

I do this for my Tomcat instances. (Formerly Confluence, now XWiki.) The http → https vHost is a straight redirect, no proxies. The https vHost manages the proxy rewrites for Tomcat, knowing that the ...
Chris Davies's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible