Articles of 反向代理

使用Tomcat 7和IIS进行NO_CONTENT_ENCODING(OpenClinicaconfiguration)

所以我build立了一个openclinica服务器,但是我有一个(大的)问题。 我将IISconfiguration为反向代理,因此,当我键入我的域名时,它会将我的请求redirect到我的计算机上正确的端口。 除了一件事,一切都运转良好。 在应用程序的一些页面(openclinica),我最终以错误500.52。 而当我检查失败的请求日志文件,我发现这一点: -DYNAMIC_COMPRESSION_NOT_SUCCESS原因NO_ACCEPT_ENCODING 所以这里是我的应用程序的web.config文件: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <remove name="Vary"></remove> <add name="Vary" value="Accept-Encoding"></add> </customHeaders> </httpProtocol> <rewrite> <outboundRules> <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1" stopProcessing="true"> <match filterByTags="A, Form, Img" pattern="^http(s)?://localhost:3030/OpenClinica/(.*)" /> <action type="Rewrite" value="http{R:1}://mywebsite.smthg.live/OpenClinica/{R:2}" /> </rule> <rule name="RestoreAcceptEncoding" preCondition="NeedsRestore" enabled="true"> <match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" /> <action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" /> </rule> <preConditions> <preCondition name="ResponseIsHtml1"> <add […]

如何在Apache反向代理中logging来自上游服务器的响应?

我有mod_proxy安装程序的Apache作为IIS上面的反向代理。 不pipe我做什么我得到代理错误 – 来自上游服务器错误的无效响应。 我已经设置了2400秒的超时仍然错误。 我直接打IISdebugging,一切工作正常。 所以这不是IIS的问题。 我认为现在唯一的debugging方法是loggingApache从IIS获得的响应。 我怎样才能启用这种types的日志logging?

NextCloud作为Oauth提供者

我注意到在一些当前版本的NextCloud中,有一个用于添加Oauth 2.0客户端的pipe理菜单选项。 这样做会给您一个客户端ID和一个客户端密码,就像您所期望的一样,并且可以接收redirect的URL。 现在的问题是,我如何使用这个。 我只find一个在网上使用它的提及,就是这样 。 我目前正在使用Github的Bitly的Oauth2代理,可以在这里find。 我的networking服务器是Nginx,我正在运行NextCloud 12.我有另一个内部应用程序,我也托pipe,这是运行在一个空的GitLab安装和GitLab安装被用作一个Oauth 2反向代理通过之前进行身份validation到我们的内部软件。 任何帮助或指针都会很棒,这似乎是NextCloud的一个非常强大的function,它似乎没有任何支持/文档​​。 为了更具体一些,我会尽力更好地解释我目前的设置,以及我想要的样子。 当前: 如果您愿意,我有3个“子网站” GitLab: www.site.com/subsiteA/ NextCloud: www.site.com/subsiteB/ 内部www.site.com/subsiteC/ : www.site.com/subsiteC/ 用户访问www.site.com/subsiteC并退回到www.site.com/subsiteA/的GitLablogin页面。 login成功后,他们将跳回到www.site.com/subsiteC/ 。 同样,如果您访问www.site.com/subsiteB/ ,则通过www.site.com/subsiteA/进行代理,但用户仍需通过NextCloudlogin。 (去subsiteA直接到GtiLab) 理想的设置: NextCloud: www.site.com/subsiteA/ 内部www.site.com/subsiteB/ : www.site.com/subsiteB/ 如果你去www.site.com/subsiteB/你通过subsiteA反弹,但就是这样。 在此设置中,在login到NextCloud之前,不需要login到GitLab。

无法在反向代理服务器nginx中提供静态文件

我想为我的应用程序使用nginx设置反向代理 location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } location /app1/ { proxy_pass http://localhost:8081/; root /angular-path/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } 我可以去myurl.com/app1但它找不到我的静态文件。 所有这些文件仍然指向myurl.com我怎样才能解决这个问题? 编辑包括访问日志的完整configuration文件 [11/Jul/2017:19:10:12 +0000] "GET […]

更改反向代理响应位置

我在IIS上configuration了一个反向代理,它执行一个URL重写(使用ARR 3.0和URL重写模块2.0)到一个托pipe在tomcat服务器上的网站。 使用configuration反向代理本身的IIS没有configurationSSL,而且我们当前依靠负载均衡层configuration了https,而configuration的IIS位于防火墙后面,大多数用户不能真正使用http访问网站,他们必须使用https访问。 到目前为止,一切都很好,除了当我试图从该网站做login尝试,内部它在login后触发redirect,请求URL是https:// xxx ,但是,响应位置变成http://和因此,防火墙被阻止,网站没有find,但最终的“解决scheme”应该是在响应位置将http更改为https。 但是,由于我对IISconfiguration的知识有限,我不知道应该在哪里寻找帮助或任何相关的文档。 谢谢 PlayKid

Nginx返回GET本地IP而不是域

我在单独的LXC容器中使用nginx作为所有虚拟机和LXC容器的反向代理。 当我尝试在我的网站上对自己进行身份validation时,例如,在单独的虚拟机中,例如phpmyadmin或Yunohost,当POST来自域时,nginx会返回来自本地IP的响应! 看: Nginx返回一个本地IP而不是域名 在这里我试图validationphpmyadmin。 当我有效时,我必须刷新页面才能成功连接。 这是我的nginxconfiguration: server { listen 80; server_name mysql.mydomain.com; location / { proxy_pass http://10.0.2.103; } } 我的默认文件是: server { listen 80 default_server; listen [::]:80 default_server; location / { try_files $uri $uri/ =404; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Forwarded-Ssl on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; fastcgi_param REMOTE_ADDR $http_x_real_ip; proxy_set_header X-Forwarded-Proto $scheme; […]

HAproxy作为反向代理 – 无负载平衡

我想configurationHA代理只作为一个反向代理它正在实施,以取代Squid。 目前,我已经工作了,在80端口的物理防火墙发出请求,防火墙将它传递给HA代理服务器,然后将HA代理服务器传递到另一个端口上的后端networking服务器。 这是我正在使用的简单configuration; listen test 10.10.250.20:80 mode tcp balance roundrobin option tcplog server static test.com.webserver:9081 check 如果只有一个web服务器和网站,这是好的,但我想configuration它的方式,高可信代理监听stream量进入域名如test.com&然后redirectstream量&而不是哈哈的IP地址代理服务器是10.10.250.20。 那可能吗?

Nginx反向代理不工作 – Tomcat

(期望)面向用户的url:https // somedomain.com / dir / (实际工作)实际的url:https // somedomain.com:8371 / dir / 我正在尝试从一个漂亮的url创build一个反向代理来加载一个更复杂的看起来更丑陋的url。 返回的url:https // somedomain.com / dir / 然而,没有什么是加载,它返回正确的URL,但它看起来不像代理正在端口8371。 这是我的nginxconfiguration: server { listen 80; server_name somedomain.com; return 301 https://$host$request_uri; } server { listen 443; server_name somedomain.com; ssl_certificate /etc/nginx/ssl/cert.crt; ssl_certificate_key /etc/nginx/ssl/cert.key; ssl on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; access_log /var/log/nginx/access.log; location / […]

Nginx基于文件redirect

我想build立一个nginxconfiguration,它会根据外部工具的configuration来代理stream量。 例如,今天我想代理一个对example.com的请求,明天它将是一个IP地址,并在其他地方的第二天。 有什么办法可以让nginx从我可以设置的文件或环境variables中读取。 这似乎是一个黑客更新网站configuration,并强制configuration重新加载(或者是好的?)

如何使用x-www-form-urlencoded表单数据让Tomcat在XHR请求中无需主机组件的情况下处理表单url

我有一个Java应用程序(Confluence)在nginx反向代理之后的Tomcat中运行。 Tomcatconfiguration如下: <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="wiki.somedomain.com" proxyPort="443" scheme="https" secure="true"/> 和nginx一样如下: location / { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 600; client_max_body_size 10M; proxy_pass http://localhost:8090; } 应用程序的前端在一个点上发送POST请求,内容types为application / x-www-form-urlencoded,其中表单URL是“/rest/webResources/1.0/resources”。 该请求通过XHR请求发送。 这导致Tomcat回复以下错误: url中的无效请求urlscheme:%2Frest%2FwebResources%2F1.0%2Fresources; 只支持“http”和“https”。 我希望这是一个普遍的问题,但无法find任何补救措施,除非人们放弃使用nginx作为tomcat应用程序的反向代理,这对我来说不是一个不幸的select。 任何帮助,我们高度赞赏。