Articles of 反向代理

仅从一个内部服务器反向代理

我已经configuration了一个反向代理服务器,并正常工作一个内部服务器,例如我们的邮件服务器。 现在,我想知道是否可以为一个服务器/应用程序(在本例中是我们的Web Intranet)configuration反向代理。 我们的问题是Intranet调用同一个Intranet服务器和另一个内部服务器内的另一个应用程序,我知道发布这个资源的唯一方法是在我们的dmz apache中为所有apllications服务器做一个反向代理,但是我喜欢从我们的DMZ反向apache只有内部网将被调用,其他应用程序将被内部网服务器调用,而不是反向代理。 为了安全起见,我喜欢用这个系统进行configuration,只允许外部访问一台服务器。 我configuration了Debian Squeeze和apache 2.2 有可能的? 怎么样? 我会尝试提供更多关于我的环境和我想要做的事情的信息。 我有一个服务器在dmz有一个域发布DNSlogginghttps://intranet.domain.com与Apache 2configuration为本地内部网服务器( https:// local_ip / intranet / )在dmz阿帕奇configuration的反向代理: <Proxy /intranet/> ProxyHTMLLogVerbose On ProxyHTMLURLMap ttps://local_ip/intranet/ /intranet/ ProxyHTMLURLMap / /intranet/ # ProxyPass ttps://local_ip/intranet/ ProxyPassReverse ttps://local_ip/intranet/ </Proxy> (/ app3)ttps:// local_ip / app2作为(/ app2)ttps:// local_ip / app3作为(/ app3)调用另一个应用程序调用相对pathttps:// local_ip / app1应用程序位于其他服务器上,并使用绝对path从Intranet服务器调用,例如:ttps:// server4 / app4 ttps:// server5 / […]

nginx将所有请求传递给代理

我试图设置nginx作为反向代理服务所有静态资产,同时转发所有dynamic请求到Apache。 我跟随了一大堆不同的教程,其中没有一个给我想要的效果。 我的/etc/nginx/sites-available/default外观如下: server { listen 81 default; server_name localhost; access_log /var/log/nginx/localhost.access.log; root /var/www/www.example.com/httpdocs; location / { try_files $uri @proxy; } location @proxy { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffers 32 4k; proxy_pass http://www.example.com:80; } location ~ \.php$ { proxy_pass http://www.example.com:80; […]

ProxyPassReverse

我们的IT正在尝试configuration一个新的apache / jboss / apj安装程序。 当我浏览到http://domain.com/jboss/test.jsp 并回request.getRequestURL()我得到 http://domain.com/test.jsp (没有jboss)我部署的应用程序遇到了很多404的正因为如此。 这就是我们的IT部门所设置的ProxyPassReverse。 <Location /jboss> ProxyPass balancer://cluster stickysession=JSESSIONID ProxyPassReverse https://domain.com/jboss/ </Location> 不应将指令设置为: <Location /jboss> ProxyPass balancer://cluster stickysession=JSESSIONID ProxyPassReverse /jboss https://domain.com/jboss/ </Location> 编辑当我使用response.sendRedirect时,问题会出现 在我们使用的旧服务器上 response.sendRedirect("login.jsp?message=You have successfully logged off."); 让事情与我必须重新编码为新的代理工作 response.sendRedirect("/jboss/AppName/login.jsp?message=You have successfully logged off."); 我的应用程序不再是可移植的或可重复使用后者的语法。 该行在我的框架servlet注销,并由我的所有应用程序共享。 错误(在Apache中,不是jboss) response.sendRedirect("login.jsp?message=You have successfully logged off."); 文件不存在:/ folder1 / folder2 / AppNamelogin.jsp […]

如何在防火墙处理DNS

我正在跑到一个心理障碍,试图找出这一个。 我们的办公室有一个Juniper防火墙,我们做了大量的端口转发,以达到我们需要从外部访问的内部服务。 例如,我们的构build服务器位于http://machine1:8190所以我们将防火墙上的该端口上的所有请求转发到同一端口上的内部机器。 相反,我想通过http://build.mydomain.com访问构build服务器。 在内部,我将DNS设置指向运行反向代理的nginx服务器,以便http://build.mydomain.com所有内部请求代理到http://machine1:8190 。 在我挣扎的地方,我正在弄清楚如何让我的外部请求(来自外部)以相同的方式工作。 如果我将DNS设置为指向我们的公共IP,我需要在防火墙上configuration什么? 很显然,这些请求通过:80但我有另一个使用该端口的端口转发规则。 我只需要在我们的内部DNS服务器上指向防火墙的DNS? 我只是不确定什么是正确的方法。 谢谢!

将请求redirect到不同的监听器nginx

我有两个听众80和777.端口80充当反向代理。 而端口777做了一些额外的东西,并希望redirect到端口80.如何redirect到Nginx的不同端口? 我正在尝试重写,但后来发现它只是用来改变path ### server{ listen 80; server_name _; location / { proxy_pass "http://upstream0;#" is included since links are not allowed in the post } } server{ listen 777; server_name _; #doing some other extra stuf //Want to redirect to port 80 under some condition } 谢谢

Nginx +独angular兽子域虚拟主机失效(超时)

我在VPS上设置了一个服务器,通过Nginx + Unicorn为生产Rails应用程序提供服务。 目前这个工作正常与以下conf文件: nginx.conf unicorn.conf 但是, staging.appname.tld添加的子域最终会在/var/log/nginx/error.log产生以下错误: 2012/08/20 16:57:39 [error] 24673#0: *174 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: staging.appname.com, request: "GET / HTTP/1.1", upstream: "http://unix:/tmp/unicorn.appname_staging.sock:/", host: "staging.appname.com" 2012/08/20 16:58:17 [error] 24673#0: *178 upstream timed out (110: Connection timed out) while reading response header from […]

我如何获得基本的ProxyPass在Apache 2.2.17上工作?

我试图通过在计算机上创buildApache反向代理其他HTTP服务器来解决Chrome中的ERR_UNSAFE_PORT限制。 我加载了与sudo e2enmod proxy mod_proxy 我将ProxyPass /znc/ http://localhost:6667/到我的httpd.conf 我用sudo /etc/init.d/apache2 restart重启Apache 当我打开/znc/ ,我得到500内部服务器错误。 我加了LogLevel debug ,重新启动了apache,再次尝试,并没有任何可疑的: [Fri Oct 19 18:55:17 2012] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 0 in child 21528 for worker http://localhost:6667/ [Fri Oct 19 18:55:17 2012] [debug] proxy_util.c(1934): proxy: initialized single connection worker 0 in child 21528 for (localhost) [Fri Oct 19 […]

在Mac 10.8上使用Apache 2.4设置代理

我有1个应用程序(Java)在我的本地机器上运行(localhost:9000)。 我想将Apache设置为前端代理,因此我在httpd.conf中使用了以下configuration: <Directory /> #Options FollowSymLinks Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order deny,allow Allow from all </Directory> Listen 57173 LoadModule proxy_module modules/mod_proxy.so <VirtualHost *:9999> ProxyPreserveHost On ServerName project.play ProxyPass / http://127.0.0.1:9000/Login ProxyPassReverse / http://127.0.0.1:9000/Login LogLevel debug </VirtualHost> ServerName localhost:57173 我把我的vim / private / etc / hosts更改为: ## # Host Database # # localhost […]

本地TCP端口转发基于主机名头的HTTP请求

我想根据HTTP请求中的主机名将TCP从端口80转发到另一个本地端口。 我想避免使用一个HTTP反向代理,如果可能的话,因为它将在转发之前存储整个HTTP请求 – 据我所知: http : //wiki.nginx.org/HttpProxyModule 如果不能避免使用HTTP反向代理。 那么是否可以避免在转发之前存储整个HTTP请求?

$ _SERVER中使用nginx作为反向代理的HTTPSvariables

我使用nginx作为mod_php的Apache前面的反向代理。 我的网站是在https上,它需要将variables$ _SERVER ['HTTPS']设置为'on'来正确组装一些链接。 我的网站是在Drupal上,所以当决定站点是否在https下运行时,不能修复代码并检查其他variables。 有没有办法解决这个问题,只需调整nginx或apacheconfiguration? 我发现其他人也提出了类似的问题,但是我没有find适合我的解决scheme,既没有明确说明我想要的是不可能的。 (例如: HTTPS服务器/ phpvariables不可用 , Nginx:在HTTP上剥离标题,在HTTPS上添加标题 )