我已经部署了archetecture的平台,我有nginx lb服务器哈希,后面是有4个应用程序的应用程序服务器。 nginx lb服务器具有如下configuration: 上游example1.com {ip_hash; 服务器10.10.10.10; 服务器10.10.20.10} 上游example2.com {ip_hash; 服务器10.10.10.11; 服务器10.10.20.11} 所以它代理私人IP的服务器。 我的问题是,每个应用程序如何获得专用的公共IP地址? 我的代理服务器有4个IP地址,我想把每个地址指向每个应用程序。 谢谢!
Centos 7,Apache 2.4,TomCat 7.0.52,Java 1.7 我正在尝试使用HTTPSconfigurationApache来代理一个tomcat服务器(运行Jira / Confluence): (HTTPS:443) – > ApacheServer – >(HTTP:8090或HTTPS:8091)TomCat 目前HTTP代理工作完美,但我想获得HTTPS的工作。 我不介意Apache和Tomcat之间的连接是SSL(在同一台服务器上)。 当我访问https://confluence.company.co.uk/我得到/var/www/html/index.html而不是代理。 这里是tomcat的Server.xml: <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="200" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" /> <Connector port="8091" proxyPort="443" proxyName="confluence.company.co.uk" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true" scheme="https" secure="true" /> 行从Apache的默认/etc/httpd/conf.d/ssl.conf中更改: ServerName confluence.company.co.uk:443 SSLCertificateFile /etc/pki/tls/certs/company.pem SSLCertificateKeyFile /etc/pki/tls/private/company.key Apache VHostconfiguration(在/etc/httpd/conf.d/proxy_vhost.conf中): […]
我很困惑,我没有find任何soloution … 我将在Debian上configuration一个反向代理服务器,并使用iptables作为我的游戏服务器: Kernel: 2.6.32-openvz-042stab108.2-amd64 iptables -t nat -A PREROUTING -p udp –dport 27015 -j DNAT –to-destination xxxx:27015 但是我有一个VPS上不支持NAT的内核。 现在我searchiptable的替代scheme,我可以在我的Debian上使用NAT和其他的。
基本上我有一个API农场 192.168.1.1,192.168.1.2,192.168.1.3 然而,terminal有不同的文件夹结构(我不能修改的第三方!) 所以基本上我想有一个像这样的nginxconfiguration upsteam api_servers{ server 192.168.1.1/api/; server 192.168.1.2/myApp/api/; server 192.168.1.3/; } server{ listen 80; location / { proxy_pass http://api_servers; } } 但是,在上游服务器中不能有path。 我想我必须重写这些? 我知道如何为传入的请求重写它,但不知道如何以不同的方式重写它到每个后端服务器。 提前谢谢了!!
我在wp.aaa.bbb.edu上设置了一个服务器上的多重wordpress 。 这个地址是不公开的。 每个网站的url显示为: wp.aaa.bbb.edu/newsite等。 我希望这些网站之一可以通过另一个url(这是公开的),如aaa.bbb.edu/newsite 。 当用户开始浏览网页时,我希望他们只能看到这个url。 例如,即使真实url可能是wp.aaa.bbb.edu/newsite/wp-admin或wp.aaa.bbb.edu/newsite/blog-post-title ,我希望用户将这些url看作aaa.bbb.edu/newsite/wp-admin或aaa.bbb.edu/newsite/blog-post-title 。 在具有aaa.bbb.edu/newsite的服务器上,我将其添加到apache2 / sites-enabled / proxy.conf : <HTTP://ip/address/for/wp.aaa.bbb.edu/*> 命令否认,允许 全部允许 ProxyPass / newsite http://wp.aaa.bbb.edu/newsite ProxyPassReverse / newsite http://wp.aaa.bbb.edu/newsite 这种行为就像redirect一样。 当我尝试访问wp2.aaa.bbb.edu/newsite ,我将被引导到wp2.aaa.bbb.edu 。 而aaa.bbb.edu/newsite是被禁止的。 这不是一个权限问题。 任何有关mods的帮助或build议,或者完全不同的方法,都会很棒。 谢谢。 所以基本上,我想要一个反向代理,这样用户就可以访问一个在重写url时不公开的wordpress。
我正试图获得通过节点代理访问的节点https服务器。 我买了证书,并有一个独立的https服务器工作正常。 最初由于多个证书在一个文件中有一些打嗝,但是这个post有助于: http://stackoverflow.com/questions/16224064/running-ssl-node-js-server-with-godaddy-gd-bundle-crt. 早些时候,我已经通过一个基于节点的反向代理nodejitsu的http代理模块的所有连接,它有效地代理http – > http。 现在,正如所料,在将目标服务器更改为https后,代理不起作用,因为它基本上是: client -> http-proxy(public IP) -> https connection(local IP) 这实际上是https中寻求消除的中间人情况。 另外,我从https服务器得到以下错误: Error: Hostname/IP doesn't match certificate's altnames 证书是正确的,因为HTTPS没有在中间代理正常工作。 从阅读一些post,我意识到以下应该工作: client -> https-proxy (Public IP) -> http connection (local IP) 实际的本地服务器在哪里运行http和公共https。 这是基于http-proxy文档中的解释: https://github.com/nodejitsu/node-http-proxy 在这篇文章中: https://nadeesha.silvrback.com/creating-a-https-proxy-in-node-js 在http代理模块文档中,似乎有一个客户端的解释 – > https(代理公共IP) – > https(代理本地IP)。 如果是这样,我需要在目标https服务器上设置哪些证书? 在尝试这些可能性之前,我想知道: 什么是处理这个需求的标准最佳实践,以及如何在节点下实现它。 我不想介绍Nginx或Apache只是为了处理这个。 我完全偏离这里吗?
我想获取我的docker集装箱的主机名称, 因为我只能使用反向代理 ,我试图在nginx的帮助下完成。 一个docker集装箱是一个web服务,将端口8080暴露给我的本地主机。 所以我可以通过以下方式访问Web服务器: http://localhost:8080 相反,我宁愿要使用: http://webservice.local 因此,我添加到我的/etc/hosts 127.0.0.1 webservice.local 然后我安装了nginx并添加到/etc/nginx/sites-available/default : server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying […]
我仍然是一个Apache和它的configuration新手,并与我的networking服务器,我服务Redmineruby应用程序和静态内容有问题。 Apache 2.2 目前有以下代理设置: ProxyPass /portal https://mypage.domain.com:8181/portal ProxyPassReverse /portal https://mypage.domain.com:8181/portal ProxyPass /examples http://mypage.domain.com:8555/portal ProxyPassReverse /examples http://mypage.domain.com:8555/portal ProxyPass / balancer://redmine_cluster/ ProxyPassReverse / balancer://redmine_cluster/ <Proxy balancer://redmine_cluster> BalancerMember http://REDMINEMACHINENAME:3000/ </Proxy> DocumentRoot "X:/app/Redmine/public" <Directory "X:/app/Redmine/public"> Require all granted Options -MultiViews </Directory> RequestHeader set X-Forwarded-Proto "https" 当试图访问: pipe理平台: mypage.domain.com 它需要我Redmine。 好。 /门户网站: mypage.domain.com/portal 它失败 未find请求的URL / portal /在此服务器上找不到。 WEB.SERVER.ADDRESS – […]
我试图让jenkins(on /),sonar(on / sonar)和nexus(on / nexus)启动并运行。 他们似乎工作,除了jenkins给我的老似乎你的反向代理设置是打破。 我不明白为什么。 我错过了一些东西,盯着它太久了。 我做错了什么/失踪? 我的apacheconfiguration如下。 我添加了最后2到proxyPassReverse行,看看是否可以解决这个问题,就像另一个post所build议的那样,但是这对我没有任何作用。 地址的“build”条目在我的主机文件中configuration。 编辑:添加虚拟主机标签 <VirtualHost *> ProxyRequests Off ProxyPreserveHost On AllowEncodedSlashes NoDecode RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-Port "443" ProxyPass /sonar http://build:9000/sonar nocanon ProxyPassReverse /sonar http://build:9000/sonar ProxyRequests Off ProxyPass /nexus http://build:8081/nexus nocanon ProxyPassReverse /nexus http://build:8081/nexus ProxyRequests Off ProxyPass / http://build:8080/ nocanon ProxyPassReverse / http://build:8080/ […]
在我转到https://sub.mydomain.com时,我的nginx.conf有以下内容,这对于HTTPS非常nginx.conf 。 我需要也允许HTTP (因此听80)。 server { listen 80; listen 443 ssl; server_name *.mydomain.io; ssl_certificate /etc/ssl/mydomain.crt; ssl_certificate_key /etc/ssl/mydomain.key; ssl on; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; include /etc/nginx/sites-enabled/*; } 出于某种原因,当我尝试击中http://sub.mydomain.com它仍然将我redirect到https 。 我错过了什么吗?