我有一个ProxyPassconfiguration为达到以下目的:在我的服务器上,我启动一个服务,提供restAPI监听端口7777.从客户端,我希望能够调用这个API是这样的: http://example.org/servicename/PARAMETER 对这个API的完整调用应该如下所示:HTTP PUT @ http://example.org/servicename/PARAMETER (其中PARAMETER是一些string)。 内部这应该转化为以下url: http://server.ip:7777/servicename/PARAMETER 一切都按预期工作,只要PARAMETER不是(!)像这样: http://parameter.org : http%3A%2F%2Fparameter.org (实际上我需要URL编码: http%3A%2F%2Fparameter.org )。 总之,这个电话是http://example.org/servicename/http%3A%2F%2Fparameter.org 参数中的http://混淆了apache,导致在对该调用的回复中出现以下错误消息: !DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /servicename/http://parameter.org was not found on this server.</p> <hr> <address>Apache/2.2.22 (Debian) Server at example.org Port 80</address> </body></html> 如果我用例如testreplacehttp%3A%2F%2Fparameter.org ,那么一切正常。 不知何故http://在参数混淆了Apache。 有没有办法让Apache忽略它? 我这个虚拟主机的当前configuration如下所示: […]
试图让URL重写与端口转发工作,但似乎不起作用。 我的应用程序服务器运行在:8080端口,而nginx工作在默认的80 。 所以我不仅要重写url,还要把请求转发到另一个端口。 其实,我唯一想做的是通过它的快捷方式http://localhost/tom来查询现有资源http://localhost:8080/#/cat/tom ,而不需要任何redirect。 这是我基于nginx文档和其他问题所做的: server { listen 80; server_name localhost; root /; #charset koi8-r; #access_log logs/host.access.log main; location / { rewrite ^/([az]+)$ /#/cat/$1 break; proxy_pass http://localhost:8080; proxy_redirect off; } … } 已尝试其他configuration,但都没有工作。 当我访问http://localhost/tom它表示404 not found而http://localhost:8080/#/cat/tom按预期工作。 日志没有提到任何错误。 如何按预期强制这项工作?
在/ etc / nginx的/网站可用/默认 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 mywebsite.net; return 301 https://$host$request_uri; } server { listen 443; server_name localhost mywebsite.net; ssl on; ssl_certificate /etc/ssl/certs/odoo.crt; ssl_certificate_key /etc/ssl/private/odoo.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; ssl_prefer_server_ciphers […]
我刚从一家新公司开始,一直在设置他们的Apache web服务器conf文件,只是为了发现他们的Apache服务器已经成为全球开放的代理服务器两个月。 我已经在httpd.conf文件中设置了ProxyRequests Off,并重新启动了Web服务器,但是访问日志文件仍在以惊人的速度增长(每天大约一个演出)。 我注意到另外一个问题在这里发布( Apache命中代理请求 ),但他们的访问日志应该是返回404错误,而我的似乎是返回403和404代码…这是正确的吗? 以下是我的访问日志中的几行: 87.118.118.124 – – [16/Mar/2010:10:56:36 -0400] "GET http://www.c5interlude.ru/torrent/viewtopic.php?p=2501 HTTP/1.0" 404 219 "http://www.c5interlude.ru/torrent/viewtopic.php?p=2501" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 117.41.184.27 – – [16/Mar/2010:10:56:36 -0400] "GET http://ad.xtendmedia.com/st?ad_type=iframe&ad_size=300×250§ion=790074 HTTP/1.0" 404 200 "http://www.newbiegamer.com" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar)" 122.224.55.222 – – [16/Mar/2010:10:56:36 -0400] "GET […]
我有一个SQUID代理服务器在外部机器上运行,我希望我的networking上的所有networkingstream量通过。 我的目标是find一个路由器(硬件),允许我指定所有DHCP客户端获得的默认网关地址(到我的外部代理服务器的地址)。 我廉价的Linksys WRT54G不支持这个。 哪些(硬件)路由器在做什么? 我不想用个人电脑作为我的路由器。 谢谢
我已经build立了一个Web服务器来查看我的存储库(一个Gitalist实例)在http:// localhost:3000 ,我想用nginxbuild立一个代理。 我希望当接收到像DOMAIN / git /这样的URI时,请求会被代理到我的存储库视图中。 我现在的nginxconfiguration已经被声明如下: location /git { proxy_pass http://localhost:3000/; } 请求代理服务器,但没有一个图像/链接或CSS可以解决,因为他们指向“ http:// localhost:3000 / logo.png ”例如。 编辑 如果我proxy_pass到实际的服务器地址它的工作: location /git { proxy_pass http://192.168.1.111:3000/; } 但是在代理时应该有一种隐藏实际服务器地址的方法。
我正在尝试在我的家用计算机上安装一个Squid匿名代理,以便明天进行快速演示。 当我尝试使用Google Chrome连接到它时,出现以下错误代码: Error 130 (net:ERR_PROXY_CONNECTION_FAILED) 我能够从我的电脑上看到Squid网站,但是它提供了一个错误信息: 尝试检索URL时遇到以下错误:/ Invalid URL Some aspect of the requested URL is incorrect. Some possible problems are: Missing or incorrect access protocol (should be "http://" or similar) Missing hostname Illegal double-escape in the URL-Path Illegal character in hostname; underscores are not allowed. Your cache administrator is root. 我的conf文件如下所示: # # […]
我的Web服务器需要与位于防火墙后面的第三方服务器集成。 为了通过防火墙,所有的请求必须来自同一个IP地址,并通过SSLauthentication。 因此,我build立了一台应该作为代理的机器,并通过SSL将所有stream量转发到第三方服务器。 我使用证书和密钥文件设置了代理,并且可以通过CURL成功地请求第三方服务,使用证书和密钥文件。 我在Apache上安装了一个虚拟主机来传递这些请求,但不断收到错误,说明与远程服务器的SSL握手失败。 我在我的apache日志中看到以下错误消息: 代理客户端证书callback:(:443)下游服务器想要客户端证书,但没有configuration[Sun Jul 29 01:40:48 2012] [error](502)未知错误502:proxy:通过请求主体未能<第三方IP >:18443(<第三方url) [Sun Jul 29 01:40:48 2012] [error] [client] proxy:SSL握手过程中出错,远程服务器返回/ 我的apache虚拟主机configuration如下所示: <VirtualHost *:18443> ServerName <Proxy IP> SSLEngine on SSLProxyEngine On SSLCertificateFile /etc/apache2/ssl/my_server.pem SSLCertificateKeyFile /etc/apache2/ssl/my_server.key SSLProxyCACertificatePath /etc/ssl/certs ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / https://<3rd party server address>:18443 […]
我已经设置了Apache作为运行jenkins-CI的tomcat的反向代理。 我可以从外面访问该网站的罚款,除了当我loginjenkins,它redirect到我的LAN主机名,当然它失败了我的networking之外。 之后,我可以手动input原始地址到浏览器,它会正常工作,直到我必须再次login。 我不知道这是jenkins中的问题,还是在我的apache / tomcat代理设置中。 jenkins还在pipe理页面上报告说我的代理设置不正确,但是没有再说。 Apache VirtualHostconfiguration: <VirtualHost *:80> ServerName jenkins.outsideaddress ServerAlias ci.outsideaddress jenkins.insideaddress ci.insideaddress ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost> 此外,代理和proxy_http模块被加载(根据apachectl -M )
我的问题是关于使用Nginx作为另一个代理的代理。 (有点混淆) 我想设置Nginx,所以它作为一个npm镜像caching代理服务器。 这里是链接: http : //eng.yammer.com/a-private-npm-cache/ 在不受防火墙限制的本地机器上,以下configuration工作正常: proxy_cache_path /var/cache/npm/data levels=1:2 keys_zone=npm:20m max_size=1000m inactive=365d; proxy_temp_path /var/cache/npm/tmp; server { listen 80; server_name classen.abc.lan; location / { proxy_pass http://registry.npmjs.org/; proxy_cache npm; proxy_cache_valid 200 302 365d; proxy_cache_valid 404 1m; sub_filter 'registry.npmjs.org' 'classen.abc.lan'; sub_filter_once off; sub_filter_types application/json; } } 现在我想把它应用到一个额外的防火墙后面的服务器。 在日志中,我可以确认它访问正确的上游IP,但由于内部防火墙,请求失败。 我们有一个内部代理,我可以绕过防火墙,例如: $ curl http://registry.npmjs.org curl: (7) couldn't connect […]