reverse-proxy

How to serve all existing static files directly with NGINX, but proxy the rest to a backend server.

孤人 提交于 2019-12-17 05:22:39
问题 location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; if (-f $request_filename) { access_log off; expires 30d; break; } if (!-f $request_filename) { proxy_pass http://127.0.0.1:8080; # backend server listening break; } } Above will serve all existing files directly using Nginx (e.g. Nginx just displays PHP source code), otherwise forward a request to Apache. I need to exclude *.php files from the rule so

Nodejs - BrowserSync running on express server

送分小仙女□ 提交于 2019-12-14 04:22:59
问题 I want to pull a URL from the DB and use it as the proxied URL. However the setup I've come up with initializes a new BrowserSync server for each URL, using incrementing port numbers. Is there a way to accomplish this without initializing a new BrowserSync server every time? Or should I be using another approach? var bs = require("browser-sync"); var express = require("express"); var router = express.Router(); var app = express(); router.get("/", function(req, res){ var proxyUrl = getUrl() /

Jenkins / Apache Reverse Proxy Error

一曲冷凌霜 提交于 2019-12-14 03:48:27
问题 I am running into an issue that seems to be fairly common based off of my searches, however I've followed all the instructions and/or fixes I've run into but none have worked for me so I'm asking this hoping someone can guide me in the right direction. I have Jenkins 1.644 installed on OS X 10.11.2 from Homebrew. I followed these instructions on how to install and get it setup inside OS X Server 5.0.15 Websites (I believe this version of OS X server is running Apache 2.4.16. The problem: When

Nginx Reverse proxy to remove port number

房东的猫 提交于 2019-12-14 03:35:32
问题 Need windows server setting to map the port domain abc.com:8145 to abc.com server {listen 8145; server_name abc.com;} Need server and location config to reverse proxy it can anyone provide the working example of redirecting website 回答1: server { listen 80; server_name abc.com location / { proxy_pass http://127.0.0.1:8145; // the IP is your server ip. proxy_set_header Host $host; //abc.com proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }

createResolver() in twisted not working

橙三吉。 提交于 2019-12-14 02:46:17
问题 I have a simple proxy script where I use installResolver function to choose where the script reads its hosts file: from twisted.internet import reactor from twisted.web import proxy, server from twisted.python import log from twisted.names import client def createResolver(servers=None, resolvconf=None, hosts=None): if platform.getType() == 'posix': if resolvconf is None: resolvconf = b'/etc/resolv.conf' if hosts is None: hosts = b'/root/example' theResolver = Resolver(resolvconf, servers)

How do I create a reverse proxy that runs in Azure?

风流意气都作罢 提交于 2019-12-13 17:42:49
问题 We have a static WordPress website that we would like to be able to scale ad-hoc. In the long term we will move the site to eg. Umbraco CMS, but right now we would like to put in an Reverse Proxy frontend that takes the load of the current site. We have tried writing out own HttpHandler (like this http://www.codeproject.com/KB/web-security/HTTPReverseProxy.aspx), but we want a more robust solutions that handles caching out of the box, HTTP redirects (301, 302) etc. We would like to be able to

Apache directory trailing slash issue behind https

我与影子孤独终老i 提交于 2019-12-13 15:26:39
问题 I run an apache server behind an https portal and have an issue with directory redirection. My apache server is a docker container that receives requests forwarded by an https portal container (steveltn/https-portal). Everything works fine, except the default http redirections that are made to http instead of https. For instance, let say we have a directory named test in my apache website. Calling https://example.com/test returns a 301 code with redirection to http://example.com/test/. The

Getting sporadic “http: proxy error: read tcp: i/o timeout” on Heroku [closed]

若如初见. 提交于 2019-12-13 09:44:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . I'm getting this error sporadically on Heroku: Proxy service: Dec 27 14:53:05 betalo-turnpike-production app/web.2: { [...] } Dec 27 14:53:08 my-proxy app/web.2: { "level":"error", "ts":"2018-12-27T14:53:07.771Z", "caller":"httputil/reverseproxy.go:393","msg":"http: proxy error: read tcp [REDACTED]->[REDACTED]

Node.js proxy server socket hang up

一个人想着一个人 提交于 2019-12-13 08:26:26
问题 I am using Node.js as a proxy server and I cannot get rid of the following error. Can anyone familiar with NodeJS assist in finding a solution. Each time this happens I have to restart the .js proxy. events.js:71 throw arguments[1]; // Unhandled 'error' event ^ Error: socket hang up at createHangUpError (http.js:1264:15) at CleartextStream.socketCloseListener (http.js:1315:23) at CleartextStream.EventEmitter.emit (events.js:93:17) at SecurePair.destroy (tls.js:938:22) at process.startup

Can I turn off an Apache Directive then turn it on in an include?

泄露秘密 提交于 2019-12-13 07:30:15
问题 I have a VirtualHost block that includes common configuration items, one directive is ProxyPreserveHost. Can I "procedurally" turn off ProxyPreserveHost for a Rewrite directive then have the include turn it back on? For example: <VirtualHost *:80> ServerName www.blah.com ... ... ProxyPreserveHost off RewriteRule /somepath http://otherhost/otherpath [P] Include /path/to/file/turning-on-ProxyPreserveHost </VirtualHost> The otherhost is on a CDN and preserving the host is creating some name