目前,我们正在使用nginx作为我们主要的前端服务器,以Mesos-DNS为基础的dynamicDNS服务发现支持的一组服务。 我们的nginxconfiguration看起来有点像这样; http { resolver 10.10.1.1 valid=1s; // some internal DNS server } server { set $core_api core-api-service.marathon.mesos; // some internal DNS location /api { proxy_pass $core_api:8080; // resolve core_api DNS dynamically to one of the IP's of the slave the process is running + listening on } } 现在的问题是这个设置工作正常,但是4-5个请求中的一个总是导致Nginx丢回404,这是没有意义的,因为在集群内运行的服务没有移动到不同的从设备。 现在,parsing器valid=1s是相当积极的,所以我们把它延长到更长的时间,认为也许是太频繁地查询DNS。 但是,任何价值都会导致同样的问题。 删除valid=xx也没有帮助。 这里发生了什么? 我们如何减轻这一点? […]
我已经configuration了一个反向代理设置,将Apache作为反向代理服务器,将JBoss节点作为原始服务器。 我如何获取login到Apache日志的原始服务器的名称? 在mod_proxy或标准的apache自定义日志中,我看不到与此相关的任何格式string。 我应该在jboss的HTTP头中打印源服务器的主机名,然后在Apache中使用%{header}o格式string?
我们正在尝试将Apache Traffic Server设置为我们的Web服务器的反向代理。 这里是基本的: 从源代码(6.1.0)构build并安装到/ opt的Apache Traffic Server运行在CentOS 7(7.1.1503)服务器上。 Apache Traffic Server设置为将端口80和443通信(通过remap.config)redirect到我们的Web服务器,即在Windows Server 2012上运行的IIS 在我的本地机器上,正确修改了我的主机文件(我们没有在生产中运行反向代理),我可以正常访问我们的网站,并按照预期通过反向代理将其redirect到Web服务器。 当我尝试访问我们网站的HTTPS版本时,我在Firefox中获得了“安全连接失败”。 与错误代码“ssl_error_rx_record_too_long”。 在Chrome中,我得到“ERR_SSL_PROTOCOL_ERROR”。 我已经将records.config和remap.config的匿名版本上传到Pastebin(请参阅此处和此处 ),并且我们的ssl_multicert.configconfiguration如下: ip_dest=* ssl_cert_name=star_foo_com.pem 我并不是很了解networking方面的东西,但是我认为这一点很重要。 我确信我只是在configuration过程中错过了一些简单的东西。
TL; DR:通过Apache ReverseProxy将超过5分钟的Web任务出错。 时间较短的任务/报告成功。 直接访问报告成功( http://internalserver/foobar.aspx而不是http://public.mycompany.com/foobar.aspx )。 我应该在哪里看,我缺less什么超时? 我有一个Apache实例切换到HTTPS,然后ProxyPassing一个请求沿着它的快乐方式…到Windows Server 2012 R2 IIS 8实例。 Browser <==> Apache 2.2.15 <==> IIS 8 (Windows 2012 R2, IIS 8.5.9600.16384) <==> Web App (<==> database) 一切都只是厚脸皮 – 直到一个“长时间运行”的报告被启动。 直接在Windows服务器上运行时,报告需要大约6分钟。 当从浏览器运行时,更短的报告成功 – 但这最终失败。 网页错误: 502 Proxy Error Proxy Error The proxy server received an invalid response from an upstream server. […]
我有nginx作为ssl的玻璃鱼服务器的反向代理服务,提供三个glassfish上下文,一个演示站点,一个jenkins和一个glassfishpipe理服务器。 根被redirect到演示站点。 Http被redirect到https,nginx做ssl卸载。 所有的工作都完美地解决了两个问题: 当第一次浏览演示网站(或删除浏览器历史logging后),我得到了glassfish的根,而不被redirect到https。 做一个刷新,我正确地redirect到https演示网站。 当浏览glassfishpipe理员时,我得到一个空白页面,pipe理页面的索引正确加载,但所有资源不加载(404)。 nginx错误日志给我显示以下错误: 2015/11/19 08:27:13 [error] 12656#0: *2 open() "/usr/share/nginx/html/resource/community-theme/images/login-product_name_open.png" failed (2: No such file or directory), client: <ip-address>, server: demo.domain.nl, request: "GET /resource/community-theme/images/login-product_name_open.png HTTP/1.1", host: "demo.domain.nl", referrer: "https://demo.domain.nl/admin/" 任何帮助非常感谢! 下面你可以find我的nginx conf: server { listen 80; listen [::]:80; server_name demo.domain.nl; return 301 https://$server_name$request_uri; } server { listen 443 default ssl; […]
我们有一个公共Web服务器,需要通过HTTPS从客户系统接收HTTPS请求: Our system <— HTTPS Reverse Proxy <– Customer system 不幸的是,客户需要特定的防火墙设置,我们的反向代理只能提供相当大的工作量和成本。 问题:我们可以使用第二个HTTPS Reverye Proxy作为“适配器” Our system <— HTTPS Reverse Proxy <— "compatible" HTTPS Reverse Proxy <– Customer system 或者这是绝对不可能的HTTPS连接?
我的Nginx反向代理做的很奇怪。 一个域特别是不能正确parsing,而是显示一个完全不同的主机的网站。 只有wiki.example.net是错误的,它会redirect到www.client.co.uk 。 其他一切都很好。 在/ etc / nginx / sites-available中的3个单独的文件中 默认 server { listen 80 default_server; server_name _; root /var/www/example/; index index.html index.php; include /etc/nginx/include/php; } wiki.example.net upstream examplewiki { server 10.2.7.18:80; } server { listen 80; server_name wiki.example.net; location / { proxy_pass http://examplewiki/; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; […]
我正在使用我的apache作为一个反向代理服务器的一些内部端口上运行的Web服务器的请求,以允许通过我的常规虚拟主机访问。 这是一个在stream浪汉中运行的Ubuntu 15。 这是我的虚拟主机configuration: <VirtualHost *:80> DocumentRoot /vagrant/htdocs ServerName test.vm # proxy pass mailcatcher to internal webserver <Location /mailcatcher> ProxyPass http://localhost:1080 ProxyPassReverse http://localhost:1080 </Location> <Location /assets> ProxyPass http://localhost:1080/assets </Location> <Location /messages> ProxyPass ws://localhost:1080/messages ProxyPassReverse http://localhost:1080 </Location> <Directory /> Require all granted </Directory> <Directory /vagrant/htdocs> AllowOverride all </Directory> </VirtualHost> 有一段时间,这工作正常。 但是,一段时间后,突然将所有对此虚拟主机的请求代理到内部networking服务器。 所以,如果我首先调用http://test.vm/cron/mails.php ,它将按预期运行mails.php 。 然而,经过一段随机的时间或事件之后,突然之间,上述的URL将会开始为Mailcatcher提供响应。 您正在查找的消息不存在,或者没有此类内容 […]
是否有可能使apache(2.2)mod_proxy跟随上游redirect(http 301,302)? 通常会configuration一个反向代理,如: ProxyPass /foo http://upstream.example.com/bar ProxyPassReverse /foo http://upstream.example.com/bar 但是,如果upstream.example.com使用redirect进行响应,则客户端将通过upstream.example.com响应。 是否有可能使Apacheredirect直到获得正确的响应,然后才回应客户端?
我们在主域名的子目录中运行一个WordPress博客。 domain.com => Server A (Nginx) domain.com/blog => Server B (Apache) 博客本身位于不同的(便宜的共享主机)服务器上,并被反向代理。 Nginx => Apache 由于对博客的每个请求都通过主服务器传输,所以服务器B不断阻止我们的服务器IP地址,因为所有请求都来自同一个IP。 如果同时发生大量请求(主要是爬虫),我们会被列入黑名单10分钟,导致502错误的网关错误。 有没有办法将真实的IP地址传递给服务器B? 或者知道别人解决scheme,而不升级到根服务器? 在服务器A上托pipewordpress博客,现在可悲的是不是一个选项。