我需要使用Apache(或其他)代理来启用不支持CAS的平台(即splunk )的SSO, 看起来互联网上的每个人都“成功地configuration了他们的Apache CAS代理”,但是我们(Google和I)找不到任何简单而直接的例子来说明这个问题。 有人愿意分享一个这样的代理configuration的基本版本?
我想将我的API(及其文档)的v1.2公开给中国的用户。 父网站mysite.mycompany.com被阻止,但1.2.3.4不是,所以我在这个地址build立一个反向代理,他们可以用来访问我的服务。 我已经configuration了一个Nginx来将http://mysite.mycompany.com代理反向到http://1.2.3.4 该代理在Firefox和IE浏览器中运行良好,但在Chrome浏览器中不起作用。 login是使用cookie进行pipe理的,但Chrome会忽略login时代理发送的Set-Cookie头,我不明白为什么。 这可以防止Chrome用户login。 父站点对login请求(其中Set-Cookie成功并且login成功)的响应标头是 HTTP/1.1 302 Found Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0 Content-Type: text/html; charset=UTF-8 Date: Tue, 12 Aug 2014 18:16:57 GMT ETag: "1407867417" Expires: Sun, 19 Nov 1978 05:00:00 GMT Last-Modified: Tue, 12 Aug 2014 18:16:57 +0000 Location: http://mysite.mycompany.com/user/me/apps Server: Apache X-Powered-By: PHP/5.3.15 Content-Length: 0 Connection: Keep-Alive Set-Cookie: SESS25fe1d0b3b7239f403e22223da0614cf=Oo-PXr4XYQCFUKYUyZgX3UJpWADAhF_q7Xf-8gko3BU; expires=Thu, 04-Sep-2014 […]
在nginx位置指令中,我如何匹配s3的url。 例如,错误的url是: http://example.com/https://s3.amazonaws.com/mybucket/logo.jpg?1404251306 从日志,我可以看到nginx能够从这个url服务请求,并返回一个404。 xx.xx.xx.xx – – [15/Aug/2014:12:38:04 +0000] "GET /https://s3.amazonaws.com/mybucket/logo.jpg HTTP/1.1" 404 151 "-" "Mo 有了这个,我想匹配这个url,将请求代理到s3并返回logo.jpg 。 我已经想出了这样的事情: location ~* ^/https/(.*) { set $s3_host 's3.amazonaws.com'; set $s3_bucket 'mybucket'; proxy_set_header Host $s3_host; proxy_set_header Authorization ''; proxy_hide_header x-amz-id-2; proxy_hide_header x-amz-request-id; proxy_hide_header Set-Cookie; proxy_ignore_headers "Set-Cookie"; proxy_buffering off; proxy_intercept_errors on; resolver 8.8.8.8 valid=300s; resolver_timeout 10s; proxy_pass http://$1; } […]
我试图用反向代理访问另一台服务器。 “主”服务器在mydomain.com后面,我想通过使用mydomain.com/test访问第二个。 目前只是mydomain.com/test的作品。 但是,如果我尝试访问mydomain.com/test/myfiles,我被redirect到mydomain.com/myfiles,因为这个URL的目标是“主”服务器,所以不存在404找不到。 我尝试了多个与proxy_redirect的东西,重写但没有任何工作。 server { listen 80; index index.php index.html index.htm; root /path/to/content; server_name localhost mydomain.com; location / { try_files $uri $uri/ =404; #/index.html; } location /test/ { proxy_pass http://192.168.1.202/; proxy_set_header Host $host; } location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } curl -I "http://192.168.1.202" -H "Host: mydomain.com"在主服务器上给出: HTTP/1.1 […]
我有一个大数据网站(wordpress secondry develop)一个域www.example.com。 我已经存储到3服务器。 In DNS setteing IP address (IN A / AAAA) 46.192.22.01 IP address (IN A / AAAA) 46.192.22.02 IP address (IN A / AAAA) 46.192.22.03 server1 46.192.22.01 / var / www / html – > / music&/ video server2 46.192.22.02 / var / www / html – > / article&/ photo server3 […]
当使用Apache来反向代理,是否有可能转发http://somesite.com/和http://somesite.com/foo到不同的服务器? 说一个去http:// internalserver1 /和另一个去http:// internalserver2 / foo 我显然可以进一步下降path(即http:// somesite / bar ),但它不可取。
我有Webminconfiguration监听localhost:1000和nginxconfiguration为侦听my.domain.tld:80与反向代理指向Webmin。 这种configuration工作正常,但有时我得到404错误和HTTP标头说,这是Webmin的miniserv把302redirect到他们: HTTP / 1.0 302暂时移动date:2010年1月3日11:38:46 GMT服务器:MiniServ / 0.01连接:closures位置: http://my.domain.tld:10000 / webmin / 你能build议如何禁用这种行为?
在我的地方,我有4台服务器,每台服务器都运行Win2008r2-WEB作为web服务器,运行着不同types的服务器(TomCat,IIS,Apache,ZendServer),每台服务器也有不同的IP地址(10.0.0.0/24) 有没有办法根据主机名将stream量路由到每台服务器? (例如:apache.domain.org,iis.domain.org,tomcat.domain.org,zend.domain.org) 显然,我不能将Alogging更改为内部IP,并且我无权访问更改端口。 另外由于代理原因,我不能只使用其他端口,我只能访问:80来电。
我只是安装并configurationVarnish在端口80上工作,而Apache在端口8080上工作。我试图用命令service varnish start来启动Varnish,但它给了我这个错误: varnishd死了但pid文件存在 我在/etc/sysconfig/varnish编辑了这个configuration: DAEMON_OPTS="-a :80 \ -T localhost:6082 \ -f /etc/varnish/default.vcl \ -u varnish -g varnish \ -S /etc/varnish/secret \ -s file,/var/lib/varnish/varnish_storage.bin,1G" 这是default.vcl文件的内容: backend default { .host = "127.0.0.1"; .port = "8080"; .connect_timeout = 600s; .first_byte_timeout = 600s; .between_bytes_timeout = 600s; } sub vcl_recv { if (req.request != "GET" && req.request != "HEAD" […]
我在httpd.conf中添加了以下内容(在VirtualHost之后): <VirtualHost *:80> ServerName XXX.XXX.XXX <Directory proxy:> Order allow,deny Allow from 10.52.208.221 Allow from 10.52.208.223 Deny from all </Directory> ProxyPass / http://XXX.XXX.XXX/ RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/admin/$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </VirtualHost> 但是,我可以从其他IP访问我的VirtualHost: # cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.4 (Santiago) # uname -a Linux XXXXX.XXXXX.XXX 2.6.32-358.18.1.el6.x86_64 #1 SMP Fri Aug 2 […]