Articles of 反向代理

apache2反向代理2虚拟主机&ssl

我有2个服务器:app1.example.biz&app2.example.biz我需要做以下使用apache2作为反向代理redirect来自互联网的所有stream量到适当的服务器和使用ssl。 我所做的configuration允许我将app1.example.bizredirect到https app1.example.biz,我可以访问服务器。 问题是,我不能做同样的app2.example.biz,当我键入app2.example.biz它redirect到https app1.example.biz! PS:我不能发布超过两个超链接,因为我是一个新用户,但我的configuration是正确的。 <VirtualHost *:80> ServerName app1.example.biz/ Redirect / https app1.example.biz/ </VirtualHost> <VirtualHost *:443> ServerName app1.example.biz ServerAlias app1.example.biz ProxyPass / http app1.example.biz/ ProxyPassReverse / http app1.example.biz/ SSLEngine on SSLCertificateFile /etc/ssl/servwiki.crt SSLCertificateKeyFile /etc/ssl/servwiki.key SSLVerifyClient none </VirtualHost> #<VirtualHost *> # ServerName app2.example.biz/ # Redirect / https app2.example.biz/ #</VirtualHost> <VirtualHost *> ProxyPreserveHost On ServerName app2.example.biz […]

Nginx的反向代理使用try_files是服务的PHP文件unparsed

我使用Nginx作为处理PHP的Apache的反向代理,这里是我的nginx站点configuration: server { listen 80 default; server_name localhost; access_log /var/log/nginx/localhost.access.log; root /var/www/www.example.com/httpdocs; location ~ \.php$ { proxy_pass http://www.example.com:80; } location ~ /\.ht { deny all; } #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; […]

反向代理到整个WWW

我试图创build一个反向代理工作像http://www.meowbify.com/ ,这是一个很酷的平台,用猫animationreplace图像。 我尝试了Apache和nginx的“反向代理”,只是为了反向代理一个现有的网站,它可以与www.bcc.co.uk这样的网站一起工作,但是没有与网站.com.cn一起工作。 (我在nginx中使用apache和proxy_pass中的常规ReverseProxyPass)。 在Apache中,我也使用了proxy_html_module,以重写链接。 那么http://www.meowbify.com/是如何工作的呢? 我已经搜查了mobifiy网站,其中指出: 它是如何工作的:Mobify.js使用一种称为客户端适配的技术来在浏览器中重新混合HTML。 浏览器会将重新混合的内容解释为服务器首先发送它! Mobify.js标签引导适配并加载执行它的Mobify.js文件。 该标签在iOS,Android和黑莓浏览器中激活。 默认情况下,Mobify.js文件是从开发服务器加载的。 开发服务器是Mobify Client的一部分,Mobify Client是一个用于构buildMobify.js项目的命令行工具。 它根据请求dynamic地编译Mobify.js文件。 该文件包含两个部分,Mobify.js API和网站特定的修改。 适应性被expression为对源DOM的一系列操作,即从页面的原始HTML构build的DOM。 可以selectHTML元素,然后使用模板进行渲染。 最后,呈现的模板被写入浏览器。 长话短说,它使用一些CSS魔术,以显示适合每个浏览器的网站。 我想,mewbifity的伎俩是操纵网站目录(即cat.'site'.meowbify.com /)。 那么我怎么能做类似的事呢? 在此先感谢,Guyl

Nginx的上游失败了,如何恢复

从doc: http : //wiki.nginx.org/HttpUpstreamModule#server 它说当上游在max_fails内达到max_fails它将会死亡。 如果我的服务器有时在后面呢? 一般来说, 如果上游服务器发生故障,nginx会重试池中的另一台服务器吗? 任何variables,我可以configuration,以便他们将自动join池中,当他们起来? 谢谢。

Nginx反向代理Heroku的应用

是否可以在我的个人VPS上使用Nginx作为Heroku前面的反向代理(运行Ruby on Rails应用程序)? 我想这样做,因为我想要路由标准请求(即GET http://mydomain.com )到我的Rails应用程序,但各种子域请求(即GET http://joe.mydomain.com )到一个单独的服务器。 作为第二部分的一部分(假设这是可能的),在这种情况下设置的Nginx代理头文件是什么? 在Unicorn前面使用Nginx时,我通常会做以下事情: proxy_redirect off; proxy_read_timeout 5m; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto http; 就像在几乎所有的教程中一样,但是在这种情况下,我还没有足够的知识来知道哪些是适用的(或者是缺less的)。 帮助将不胜感激!

Nginx代理不会将控制器/操作结构中的url传递给Apache2

我使用Nginx作为Apache2的代理。 目前的configuration工作,我可以访问该网站。 然而,PHP应用程序是基于Zend Framework 2构build的,依赖于/ controller / action / structure中的url,并不会传递给Apache2。 这导致从主页到子页面的每个链接都被破坏,并redirect到我们的“找不到页面”页面。 传递给Apache2的url是/index.php而不是/ controllerX / actionY Nginx(VirtualHost)configuration server { listen 80; root /var/www/talentina_dev/talentina-alpha-temp/public/; index index.php index.html index.htm; server_name dev-aws.talentina.com; location / { try_files $uri $uri/ /index.php; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:8080; } location ~ \.php$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header […]

具有主机头function的路由器/网关

任何人都可以指导我寻找什么来获得我的家庭办公环境的路由器/网关/防火墙能够运行多个例如Web服务器端口80,与一个公共IP。 我知道这可以在服务器计算机上使用Apache或IIS来完成。 思科或Netgear路由器? 例如: host1.example.com:80 – > 192.168.0.101 host2.example.com:80 – > 192.168.0.102

在这个Apache站点configuration中是否有语法错误或其他错误?

我有一个Django Gunicorn服务器,在0.0.0.0:8000的Ubuntu VPS上运行,虽然有一些问题,它似乎是接受本地主机连接。 我有我的网站启用configuration文件中的以下内容: <VirtualHost *:80> ServerName pragmatometer.com ServerAlias www.pragmatometer.com analyticalnoticeboard.com www.analyticalnoticeboard.com logisticmvc.com www.logisticmvc.com ServerAdmin [email protected] DocumentRoot /home/jonathan/classicorthodoxbible.com <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options ExecCGI Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from […]

如何正确configuration端点在根上下文中的nginx代理传递?

我试图找出如何在端点处于根上下文中时在nginx中configuration反向代理: http://frontend.com/mylink代理转发到http://10.0.0.2:8000/ 不幸的是,我不能在http://10.0.0.2:8000更改应用程序的上下文,所以我试图找出解决这个问题的nginx解决方法。 有以下情况时,以下configuration通常可以正常工作,但在以上情况下不起作用: location /mylink { proxy_pass http://10.0.0.2:8000; proxy_redirect http://10.0.0.2:8000 /mylink; port_in_redirect off; } 任何想法,我在这里失踪?

最简单的方法转发HTTP请求到不同的服务器

我有一个移动应用程序需要通过HTTP API与第三方服务器通信。 但是第三方服务器只能从一个被认可的IP地址访问,这意味着我需要把我的服务器(其IP已被批准)在应用程序和第三方服务器之间。 什么是最简单的方式来设置服务器? 我基本上需要我的服务器简单地转发HTTP请求到不同的服务器。