New answers tagged

0

Having gone through this, I think the mapping function I mention in my edit is the best way to resolve this: frontend http maxconn 2000 bind 0.0.0.0:5000 use_backend bk_%[base,map_beg(/path/to/map/file/config/haproxy.map)] backend servers-test1-server http-request set-header X-Forwarded-Proto https if { ssl_fc } server www.testserver.com 127.0.0....


6

If you want to serve serve content from multiple services or multiple servers from the same domain you can configure your webserver to act as a reverse proxy. The services (often called backend server or application server) do not necessarily need to be directly reachable from the client, it is common that only the webserver that actually serves the client ...


2

The server directive supports only explicit upstream IP address:port pairs or Unix domain socket paths. You should use a configuration management system, which updates nginx configuration file and sets up containers at the same time, therefore always keeping nginx configuration in sync. One option is to add all possible server entries in the upstream section ...


0

Ok, this is entirely my mistake (comes from not being a coder). I was using chrome's developer tools to look at the desktop.js file the browser downloaded using the preview function in the network tab of chrome developer tools. It makes the code pretty. It never occurred to me it would insert spaces where it felt was good. I downloaded the desktop.js file ...


0

I found out an issue. It was because of Cloudflare. I need to enable DNS only mode. Can read about Cloudflare WebSocket here. https://support.cloudflare.com/hc/en-us/articles/200169466-Using-Cloudflare-with-WebSockets


1

This is not about The Lounge or reverse proxy, but how Apache handles virtual hosting. The official documentation even has examples for common setups, including Using Virtual_host and mod_proxy together. <VirtualHost *:443> ServerName irc.example.com RewriteEngine On RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{...


0

Have you tried adding starting & ending quote("") around slash(/) ? Means: ProxyPass "/" "http://localhost:3000/" retry=1 acquire=3000 timeout=3000 keepalive=off ProxyPassReverse "/" "http://localhost:3000/" May be it's causing trouble. Reference: https://httpd.apache.org/docs/2.4/mod/mod_proxy.html


1

It was easier than I thought. My issue was the trailing slash at the end of the location as it is automatically remove at the end of the URL in the browser. So this is the working config: <VirtualHost *:443> RewriteEngine On ServerName www.example.com DocumentRoot /var/lib/letsencrypt/http_challenges ProxyPass / http://...


2

Configure your backend with the correct base URL so it generates the correct links. Since you seem to be using Ghost for your blog, the option is called url. "url": "https://example.com.au/blog/" Of course it would make more sense to proxy this directly to ghost instead of proxying it twice. server { server_name example.com.au; #...


0

You could try to force nginx to consider all servers having the same weight: upstream file_server_com { server machine-01 weight=1; server machine-02 weight=1; } that might help instill the right algorithm. Or use the least_conn attribute if round-robin cannot get obtained. At least, the least busy server should be selected. But according to this SO ...


1

It may be better to use rewrite...break rather than trying to get proxy_pass to do it properly. For example: location /try-me { rewrite ^ /?id=true&zone=false break; proxy_pass https://some-domain.com; } The rewrite directive will append the original parameters correctly. See this document for details. In the above example, any URI that begins ...


0

Take a look at Inlets. It uses WebSockets to securely connect services across networks. It does not require opening ports on the LAN like you would need to do if using a VPN.


1

This setup requires that the original Host: header be passed onward from your proxy to the new origin server. This is done with ProxyPreserveHost: ProxyPreserveHost On


0

If you want each site to answer to different hostnames then you need to use separate server blocks for each hostname in the backend, as you already did on the other nginx server.


0

Layer 4 means it got timeout waiting for TCP handshakes, maybe server is down? Layer 7 means it got timeout waiting for HTTP answer, so application is running (starting maybe?), listening on the specified port and accepting TCP connections, but didn't provide HTTP response in time. Maybe it is still launching? Some java applications take minutes to actually ...


2

I am using nginx with PHPFPM and error was related to memory/cache as this VPS has only 1GB of RAM. First I looked into nginx logs: sudo tail /var/log/nginx/error.log -n 10 And found error: upstream sent too big header while reading response header from upstream So I added following lines in /etc/nginx/nginx.conf which fixed the issue fastcgi_buffers 16 16k; ...


1

By returning 'any-cert' AS 'ssl' in your passdb, you force dovecot to use TLS for downstream connections. Unfortunatly there is no way that I know of to change the connection type between starttls or tls based on something that passdb returns (https://dovecot.org/pipermail/dovecot/2018-September/112928.html) My Workaround is to force STARTTLS Connections ...


0

Enable “proxy_http” and "headers" modules sudo a2enmod proxy_http sudo a2enmod headers sudo service apache2 restart Setup the reverse proxy virtual host configuration ProxyPreserveHost On ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:6081/ RequestHeader set X-Forwarded-Port "443" RequestHeader set X-Forwarded-...


0

I'm also getting the same error but in my case, the accepted answer here solved this error: https://stackoverflow.com/questions/47718508/apache-proxypass-https-and-remote-server-with-sni I added ProxyAddHeaders off ProxyPreserveHost off


Top 50 recent answers are included