30

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://ip_of_the_app:7180/; proxy_redirect http://ip_of_the_app:7180/ http://$host/sales/; } This allows you to host the /sales/ path somewhere else. But even ...


14

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 internet, but firewalls block them. The users can configure their browser to reach a proxy server, which will make the connection for them. A "reverse" proxy ...


6

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 and this setting will persist across reboots: /usr/sbin/setsebool -P httpd_can_network_connect 1 Credit: https://web.archive.org/web/20190313023936/http://...


4

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 mail proxies or even load balancers (which often refers to "reverse proxy across multiple servers"). I know any "proxy" to be a "medium" A more accurate term ...


3

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 from the form of the -CAfile used on the client side. It was in x509 PEM format and contained a chain of the IntermediateCA's certificate by the RootCA's cert. The ...


3

I think you are missing the -g option, because otherwise the remote port will only be listening on localhost, meaning that any other host than the remote localhost won't be able to connect to it. With -g it listens to 0.0.0.0, which means it's available on all interfaces and not only localhost. As ssh(1) says the g option "Allows remote hosts to connect ...


3

If you are not using SSL/TLS then simply add a VirtualHost for every website: <VirtualHost www.domain2.com:80> ServerName www.domain2.com ErrorLog /var/log/httpd/domain2_com_error.log CustomLog /var/log/httpd/domain2_com_requests.log combined # You probably want either the next line: DocumentRoot /var/www/domain2.com # or the ...


2

This won't work for HTTPS sites but without any reverse proxy considerations just simple hosting, your httpd.conf should simply have 3 more of these with X modified in each one: <VirtualHost *:80> ServerName www.domainX.com ServerAlias domainX.com DocumentRoot /var/www/vhosts/domainX ErrorLog /var/log/httpd/domainX_com_error.log CustomLog /...


2

Just to make sure I understand. You ssh with that command line from a client machine to a server? Then on the server you run the curl command to port 4430? That should work. If it doesn't then log into the server and check if port 4430 is listening via netatat -tnl | grep 4430 Possibly sshd is configured to not allow port forwarding. If you want to ...


2

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.


2

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 folder before the folder you are trying to access. However, you don't need to do this. Try using alias /opt/site3; instead; this should work and access the ...


2

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 there would indicate not being able to reach the backend server in the config. Since you can reach it with curl, it would probably be a config issue. If there's ...


2

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; ssl_certificate /path/to/ssl/certificate.pem; ssl_certificate_key /path/to/ssl/certificate.key; # ... You can find more information on these settings and other ...


2

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 (QoS) and aids synchronization of multiple streams. Typically RTP will be sent on an even-numbered UDP port, with RTCP messages being sent over the next higher ...


2

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 nowadays. In addition, many webapps don't support running from a directory path inside the HTTP host and implicitly assume they have the whole root path / for ...


2

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 no /var/www/html/nextcloud directory the automatic "let's append a trailing slash to handle a directory" code doesn't fire and instead you get the ...


1

You forgot a slash at the end of location /pyserv/ :)


1

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 traffic and redirect to SSH server, and also identify HTTPS traffic, and redirect to a web server. 10.10.10.4 is the SSH server, while 10.10.10.5 is the web server ...


1

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 the X-Forwarded-Header to the new request to the final server, so no special configurations for this need to be done at the reverse proxy. To actually log this ...


1

Use /etc/hosts man 5 hosts for further information. It is used before DNS lookup to find a hostname's IP address.


1

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 HTTPS though this will fail. Instead either the protocol should be given as https:// to access the server with HTTPS on port 443 or it should be given as http:// ...


1

Working solution: server { error_log /var/log/nginx/error.log debug; listen 80; server_name ${NGINX_HOST}; sendfile on; tcp_nodelay on; root /static-pages; index index.html index.php; try_files $uri $uri/ @proxy; location @proxy { proxy_read_timeout 90; ...


1

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 bottom of your VirtualHost sections and you should be good. Restart the server afterwards with sudo service apache2 restart. <VirtualHost *:80> # ...


1

This is the reverse proxy you are looking for. http { ... upstream my_proxy { server my.proxy.com:1234; } server { listen 8080; location /path { proxy_buffering off; proxy_pass_header on; proxy_pass_request_headers on; proxy_set_header Host "anydomain....


1

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 URI has a sane pattern. Here's a (slightly) edited version of my configuration: <VirtualHost *:80> ServerAdmin web@example.com ...


1

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 be identical, so there's no way to map them to different ports. If the domains had different IP addresses, and you had a single reverse proxy responding to all ...


1

Usually in such frontends, you install the SSL traffic in the frontend, and forward to the backend the normal HTTP traffic without encryption. https http Internet --------> relayd reverse proxy -------> internal LAN web server port 443 port 80 As in, in man relayd: ...


1

What you are looking for is the -R option or RemoteForward in ~/.ssh/config. See man ssh. I am a bit rusty on this one, but I think: ssh -i ~/.ssh/yourAWSkey -R 80:localhost:80 ubuntu@PublicIpAddress should expose any webserver on your Pi listening on port 80 to the PublicIpAddress of the AWS EC2 instance. ssh portforwarding is very powerful and extremely ...


1

I may have just figured it out. By modifying the rewrite rule to this: rewrite ^/sites/(.*)$ https://server2.newdomain.com/$1 last; Seems to do the trick. Unless anyone has a better alternative. I'm still testing many links to determine if this is going to work, but so far so good. Thanks to this article. How to quick and easy remove part of an URL in ...


1

No, the VPS is acting as a forward proxy, or just a regular proxy, in this case. You can achieve this using iptables, but there are probably some easier solutions available. Using iptables, you would want to set up DNAT and SNAT rules in your FORWARD table - no I don't have specific step-by-step instructions, but it shouldn't be too difficult for you to ...


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