Tag Info

New answers tagged

0

If I understand your whole problem well, I can see another, proxy-unrelated solution: by default, client is landed on the diagnostic page (no cert. required), which makes a background, AJAX query to the protected zone. Depending on the query result, JavaScript redirects to the protected page or shows a message, explaining that something is wrong with the ...


0

You can't exactly pass it through. But, there are some hacks you can use if you're willing to change your backend. The client certificate is presented as part of TLS negotiation, which by definition can't be passed through. You can, for example, have Apache parse the certificate and propagate the (authenticated) certificate's particulars through using ...


0

Apache cannot do this. If you want a proxy inbetween, but no TLS operations from it, your proxy is essentially a TCP tunnel. A while back, when I wanted to do something similar, I came across sniproxy. It seems to me that it can do what you want. If you need Apache for other parts of your site, you may run Apache behind sniproxy. Keep in mind that, due ...


1

This is possible. On Apache web server, you need to store all the files on a default virtual host so it can be accessed as http://IP_ADDRESS:PORT/hostname/path/ On Nginx server create multiple virtual hosts & add a proy_pass rule like below. A.com -> / will proxy forward to /a-com/ B.com -> / will proxy forward to /b-com/ C.com -> / will proxy forward ...


0

The methodology for resolving this would include identifying the actual problem. I would temporarily disable https for the admin site, in a test or staging network if required due to security requirements. Then I would sniff the relevant traffic from the IIS/ARR host or from the Apache host, to see what in fact happens between the hosts when you call the ...


0

Here's a configuration that works well for query, view and replication: location /couchdb/(.*)$ { rewrite /couchdb/(.*) /$1 break; proxy_pass http://127.0.0.1:5984; proxy_pass_header Accept; proxy_pass_header Server; keepalive_requests 1000; add_header 'Access-Control-Allow-Origin' '*'; proxy_redirect off; proxy_buffering ...


1

In Apache 2.4.7, x86_64, Ubuntu 14.04 LTS I have found that this works RequestHeader setIfEmpty X-Forwarded-For "127.0.0.1" works all day long. However if one tries to use a dynamic value, RequestHeader setIfEmpty X-Forwarded-For "%{REMOTE_ADDR}e" does not work. I have found that you need the help of mod_rewrite to harvest the ...


1

Looks like you just need to load mod_proxy_http.


1

It's a relatively basic configuration -- just load mod_deflate and configure it (SetOutputfilter, AddOutputFilterByType, etc) as the manual for mod_deflate describes.


0

I know i'm pretty late to the game, but for me this is the top result when searching for this problem, so i wanted to share my solution. This uses the if directive (with one of the few valid use cases) combined with the custom error handler: upstream backend { server backend1; server backend2; } server { server_name proxy; location / { ...


1

There is a workaround for this. Idea is to make a proxy server block for each upstream. upsteam api_servers { server 127.0.1.1; server 127.0.1.2; server 192.168.1.3; } server { listen 127.0.1.1; location / { proxy_pass http://192.168.1.1/api/; } } server { listen 127.0.1.2; location / { proxy_pass ...


-1

The proxy did not work because of firewall of centos 7. After shutdown the firewall, It have been working^^


0

I'm wondering if the regex is getting confused by the rewrite engine in apache. have you tried disabling the .htaccess file and visiting the actual file in ".../wp-admin/" as ".../wp-admin/admin.php" instead?


0

How do you expect your webserver to know whether a connection came to Cloudflare over HTTPS or HTTP? There's basically two options: Cloudflare sets a header, indicating whether or not the request came to them over HTTPS; or Connections to Cloudflare over HTTPS are proxied to you over HTTPS also. I thought Cloudflare supported option 1, but I can't find ...


1

I hit this error and it was because I was setting the Host header wrong. Here's the config that ended up working: set $s3_bucket 's3-us-west-1.amazonaws.com'; ... proxy_set_header Host $s3_bucket; Note that the host header does not include http/https. That should be included in the proxy_pass line proxy_pass ...


0

HTTP Basic authentication applies to websockets connections as well as "regular" HTTP connections, so enabling auth_basic should do the trick, for suitably low thresholds of "trick".


0

I also found out that csf on Linux was banning the node executable for many connections. The solution for this would be to add the node pid to the csf.pignore, like this (I've also included the PM2 path): ... exe:/usr/local/bin/node exe:/root/npm/lib/node_modules/pm2/bin/pm2


0

With proxy_buffering off, nginx shouldn't be buffering the chunked responses from the backend. You don't need to set chunked_transfer_encoding on explicitly, it's the default. The next step I'd take towards diagnosis is to watch the stream between nginx and the backend (a quick bit of tcpdump -i lo -n port 5000 should do the trick) to see if nginx is, in ...


0

Make sure the mod_proxy and mod_proxy_http modules are loaded. For example, something like this should be in your apache configuration: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so (That example is from a CentOS 5 system) This can vary between distributions. For example, on Ubuntu you can ...


1

Here is an official Nginx Video on YouTube which demonstrates Inline Content Rewriting. https://youtu.be/7Y7ORypoHhE?t=20m22s Indeed with sub_filter http://nginx.org/en/docs/http/ngx_http_sub_module.html In your case, you're looking at something like: location / { sub_filter_once off; sub_filter_types text/html; sub_filter ...


0

http://nginx.org/en/docs/http/ngx_http_sub_module.html The ngx_http_sub_module module is a filter that modifies a response by replacing one specified string by another. This module is not built by default, it should be enabled with the --with-http_sub_module configuration parameter. Example Configuration sub_filter </head> ...


1

From my reading of the nginx websocket dock, when your nginx proxy sees the Upgrade headers, it passes them on to hack.chat. hack.chat then needs to respond with the 101 response. First of all, you want to be able to debug the actual HTTP and hack.chat transactions, so you know whether the problem is in your client app, or on the web server, or with the ...


1

You could use socat to forward that port to your game server: socat UDP4-RECVFROM:27015,fork UDP4-SENDTO:x.x.x.x:27015 Note that x.x.x.x will see the requests coming from your reverse proxy. It won't see the original IP address. Also, no idea what performance implications this has.


0

The NAT functionality is (from my knowledge of kernel building) part of the kernel, so unless you are able to rebuild the kernel modules and/or can switch the kernel you most likely will be out of luck.


0

Given that you can't connect to the backend directly using curl, the problem isn't an nginx config problem, but instead something lower-level. I'm going with firewall misconfiguration -- it's the catch-all problem in these situations.


1

Use alias instead of root. You don't even need try_files? location /assets/ { alias /var/www/frappe/sites/assets/; }


1

Do you get all 404s on requests to resources under /assets? I suspect you may want to change root to alias in location /assets, because root appends the entire request path to the directory specified, which means nginx is looking for /var/www/frappe/sites/assets/assets/site.css, for instance.


2

There are 2 options: rewrite and HTTP 301 permanent redirect, second is more preferred: server { listen 80; server_name _; return 301 https://$server_name$request_uri; }



Top 50 recent answers are included