reverse-proxy

How do I setup NGINX configuration to reverse proxy to multiple containers using different proxies and site files

怎甘沉沦 提交于 2019-12-22 09:40:08
问题 I am working on setting up our development environment using Vagrant , Docker and NGINX (among other tools). We have a common microservice architecture and we are using a container per microservice. As a proof of concept, I am using two test microservices to try to work out the development environment, a and b . We are running three containers ( nginx,a,b ) for the purpose of my proof of concept. Using reverse proxies in NGINX, I want to be able to use the following proxies. http://localhost

nginx proxy_pass to a directory

…衆ロ難τιáo~ 提交于 2019-12-22 04:51:10
问题 How can I setup nginx to reverse proxy a single folder to one server and the rest of root to a different server? The root "/" is managed by CMS while the "other" is my own programs (independent of the CMS). Here is my current configuration server { listen 80; server_name www.example.com; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443; ... <ssl stuff> ... server_name www.example.com; location /other { proxy_pass http://192.168.2.2/other ; } location / { proxy_pass

Best method of post processing Nginx reverse proxy response

让人想犯罪 __ 提交于 2019-12-22 04:29:18
问题 I'm doing some researching on switching from Apache to Nginx as a reverse proxy in front of a Grails application on the backend. I'm playing around with some URL rewriting and have run into an issue with the response being sent back from my back end. I can handle the location header rewrite but I'm wondering what the best way to process the actually content is for link and such. Is nginx_substitutions_filter the preferred method or is there another module that folks use to do content

Reverse proxy websocket IIS

风格不统一 提交于 2019-12-22 04:29:16
问题 I would like to use IIS to proxy websocket on windows. So, I set up IIS 8 in Winserver 2012, for reverse proxying a websocket server app. But I don't know how to configure IIS. There is just redirect rules for HTTP and HTTPS, no WS. I would like to have the same thing as apache : <Location /ws> ProxyPass ws://127.0.0.1:8080 ProxyPassReverse ws://127.0.0.1:8080 </Location> The request ws://127.0.0.1:80/ws will be redirect to ws://127.0.0.1:8080/ws. Thank you. 来源: https://stackoverflow.com

Why are my assets not served through a reverse proxy in apache

跟風遠走 提交于 2019-12-22 04:03:44
问题 I have a rails app running on passenger standalone, which is working perfectly. I am running apache, and use a VirtualHost with a reverse proxy to serve my rails app. This works. However my assets are not being served through the vhost, but give a proxy error. My httpd.conf <VirtualHost *:80> ServerName greekpeep_rails.nightowls.co DocumentRoot /home/railsapps/www/greekpeep/public ProxyPass / http://127.0.0.1:4000 ProxyPassReverse / http://127.0.0.1:4000 <Directory /home/railsapps/www

Replace image and javascript absolute paths through proxy_redirect in nginx

≯℡__Kan透↙ 提交于 2019-12-21 23:26:29
问题 I have a scenario as follows. Nginx is being used as a reverse proxy to a apache server listening at port 8080. nginx is running at port 80. There is a wsgi application which is being run by the apache server. Now, I have added a proxy_pass to the nginx configuration such that whatever requests come to localhost/ (nginx port is the default port 80) they get redirected to localhost:8080. Here is an excerpt from the nginx conf file: server { listen 80; proxy_set_header X-Real-IP $remote_addr;

Nginx proxy_cache_key $request_body is ignored for large request body

孤者浪人 提交于 2019-12-21 08:45:07
问题 I use nginx as a reverse proxy and I would like it to cache POST requests. My back-end is correctly configured to return appropriate cache-control headers for POST requests. In nginx I have configured: proxy_cache_methods POST; proxy_cache_key "$request_method$request_uri$request_body"; This works great for small HTTP POST requests. However I started noticing that for large requests (e.g. file uploads) it seems like the $request_body is ignored in the proxy_cache_key . When a form containing

How to use ProxyPass to serve static files through Express?

不想你离开。 提交于 2019-12-21 04:37:08
问题 I'm using Apache with mod_proxy to serve my Node app with Express, ProxyPass /nodeapp http://localhost:3000/ ProxyPassReverse /nodeapp http://localhost:3000/ but the static JS and CSS are being requested from the wrong place. For example, I want the CSS from http://homepage/nodeapp/css But it's being requested from http://homepage/css 回答1: I solved this problem in my environment by using the HTML "Base" tag in my application's index.html, and then ensured that all links within my application

Setting up Wildcard subdomain (with reverse proxy) on apache 2.2.3

百般思念 提交于 2019-12-21 04:17:33
问题 What I am trying to achieve is the following: I want to have numerous subdomains such as abc.domain.com redirect to a url such as www.domain.com/something?subdomain=abc Since I am redirecting to a fully qualified domain, I needed to use a reverse proxy to avoid the change of the URL in the browser. (using the [P] Flag and turning on the mod_proxy module and some other modules) This is my DNS setup *.domain.com. 14400 A 111.111.11.1 This is my virtual host configuration for apache <VirtualHost

WebSocket through SSL with Apache reverse proxy

随声附和 提交于 2019-12-20 10:54:06
问题 On the client side, I am trying to establish the wss connection: var ws = new WebSocket("wss://wsserver.com/test") and it returns an error: WebSocket connection to 'wss://wsserver.com/test' failed: Error during WebSocket handshake: Unexpected response code: 400 The full headers are: Request Headers GET wss://wsserver.com/test HTTP/1.1 Host: wsserver.com Connection: Upgrade Pragma: no-cache Cache-Control: no-cache Upgrade: websocket Origin: https://website.net Sec-WebSocket-Version: 13 User