我真的刚刚开始使用 lighttpd,我不确定如何准确配置它。
我想获取流量并重定向到另一台服务器说“ http://localhost/url_a/ ”并将请求和响应重定向到“ http://other_server:8080/ ”
另一个例子是“ http://localhost/url_b/ ”转到“ http://other_server:8081/url_b/ ”
我到底应该研究什么来完成这个?
谢谢。
我在具有多个公共 ip 地址的主机上有一个 Dante 服务器,但它无法绑定到主机的 ips。ips 是可以 ping 的,我有另一个服务在监听它们(不同的端口),它可以工作,所以我知道 ips 工作。在我的测试服务器上,它有 10 个公共地址,它没有问题,但在这个有数百个地址的服务器上却没有问题。错误:
debug: sockaddr2ifname(): address 138.xxx.93.2.51002 does not belong to interface
这是我的配置:
logoutput: /dev/stdout
debug: 1
internal: 138.xxx.93.2 port = 51002
external 138.xxx.93.2
external.rotation: same-same
socksmethod: username none
clientmethod: none
user.privileged: root
user.notprivileged: nobody
client pass {
from: 45.xxx.56.91/32 to: 138.xxx.93.2/32
log: error
}
socks pass {
from: 0/0 to: 0/0
session.state.key: from
session.state.max: 100
session.state.throttle: 10/2
}
Run Code Online (Sandbox Code Playgroud) 我现在有以下配置:
# Squid normally listens to port 3128
http_port 3128
cache_peer proxy1_address parent proxy1_port 0 proxy-only default login=name1:pass1
never_direct allow all
Run Code Online (Sandbox Code Playgroud)
现在,我需要以某种方式配置鱿鱼,将所有到 3128 的传入请求都重定向到 proxy1(就像现在一样),并且所有到 3127 的传入请求都将重定向到 proxy2。可以做吗?
我当前的配置不起作用:
http_port 3128
http_port 3127
acl port_3128 port 3128
acl port_3127 port 3127
# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny port_3127
# 3127
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny port_3128
Run Code Online (Sandbox Code Playgroud) 我有需要限制特定 IP (10.0.0.5) 访问的 URL。当我以下一种方式直接访问时,它工作得非常完美:
<Location /incoming>
Order Allow,Deny
Deny from 10.0.0.5
Allow from all
</Location>
Run Code Online (Sandbox Code Playgroud)
但是,当此 IP 来自代理(代理 IP:192.168.1.43)时,此解决方案不起作用。这是我在日志中看到的:
10.0.0.5, 192.168.1.43 - - [24/May/2017:16:03:54 +0300]“POST /传入 HTTP/1.0”200 698 0/6899“-”“-”
我尝试执行下一步 - 添加代理部分:
<Proxy /incoming >
Order Allow,Deny
Deny from 10.0.0.5
Allow from all
</Proxy>
Run Code Online (Sandbox Code Playgroud)
这也没有帮助。
我需要你的帮助,朋友们!!!
我有一项服务在需要 Internet 访问的 Windows 2012 R2 域成员服务器上运行。该服务配置为在托管服务帐户下运行,并且该帐户被授予域成员的本地管理员权限。组策略首选项用于为所有用户配置 Web 代理设置,相关组策略在域顶级链接。
托管服务帐户存在于顶级此类帐户的默认容器中,但是似乎没有将这些设置应用于 HKEY_USERS 下的注册表配置单元,并且手动将设置添加到相关配置单元似乎没有任何效果任何一个。如何以与任何其他普通域帐户相同的方式将代理设置应用于托管服务帐户?
active-directory proxy group-policy windows-server-2012-r2 managed-service-accounts
我使用 NGINX 服务器作为其他一些 NGINX 服务器的 ssl 代理。不幸的是,如果请求被上游服务器重定向,则位置字段包含错误的目标端口。
curl -v "https://example.com/site":
> GET /site HTTP/2
> Host: example.com
> User-Agent: curl/7.58.0
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 301
< server: nginx
< date: Sun, 18 Mar 2018 20:01:44 GMT
< content-type: text/html
< content-length: 178
< location: http://example.com:9101/site/
< strict-transport-security: max-age=15768000; includeSubDomains
Run Code Online (Sandbox Code Playgroud)
NGINX 代理:
# Proxy: example.com
####################
server {
listen 0.0.0.0:80;
listen [::]:80;
server_name example.com;
root /srv/www/_empty;
location / { return 301 https://example.com$request_uri; …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个反向代理,它匹配除 Apache 2.2 中的一个之外的每个 URL。它适用于 Apache 2.4 (Centos 7),但不适用于 Apache 2.2 (Centos 6.6) ...
# Do not modify this
<LocationMatch "^/my-website-2">
ProxyPass http://X.X.X.X:PORT/my-website-2
ProxyPassReverse http://X.X.X.X:PORT/my-website-2
(...)
</LocationMatch>
# Match every URL except the one finishing with /redirect
<LocationMatch "^/my-website(?!/redirect)">
ProxyPass http://X.X.X.X:PORT/my-website
ProxyPassReverse http://X.X.X.X:PORT/my-website
AuthType XXX
RequestHeader set XXX YYY
(...)
</LocationMatch>
# Do anothers directives with this URL only, finishing with /redirect
<Location "/my-website/redirect">
AuthType XXX
(...)
</Location>
Run Code Online (Sandbox Code Playgroud)
当我输入https://my-server.com/my-website因为正则表达式不匹配 ^/my-website时,我的服务器正在寻找 /var/www/html/my-website(不存在的)(?!/重定向)
我知道 Apache 2.2 不能理解每个负面 PCRE 正则表达式,但似乎存在一些技巧......请参阅:
我在尝试运行尝试使用以下命令获取的devstack时遇到问题,我添加了详细参数pip
sudo -H -E python /opt/stack/devstack/files/get-pip.py -c /opt/stack/devstack/tools/cap-pip.txt --verbose
Run Code Online (Sandbox Code Playgroud)
我得到了这个输出,它永远挂在那里,然后再试四次就退出了。
Created temporary directory: /tmp/pip-ephem-wheel-cache-WNf2he
Created temporary directory: /tmp/pip-req-tracker-YNDzMb
Created requirements tracker '/tmp/pip-req-tracker-YNDzMb'
Created temporary directory: /tmp/pip-install-qbbm3e
Setting pip!=8,<10 (from -c /opt/stack/devstack/tools/cap-pip.txt (line 1)) extras to: ()
Collecting pip!=8,<10 (from -c /opt/stack/devstack/tools/cap-pip.txt (line 1))
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Looking up "https://pypi.org/simple/pip/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.org:443
Run Code Online (Sandbox Code Playgroud)
我的机器坐在一个代理后面,它使用白名单来允许一些域名,这些域名是允许的。
# …Run Code Online (Sandbox Code Playgroud) Nmap 结果显示端口 8080 上有一个 HTTP 代理。不尝试代理,你怎么知道它是否是代理?
8080/tcp open http-proxy
Run Code Online (Sandbox Code Playgroud) 我有一个带有私有 IP 的私有 kubernetes 集群。为了访问它,我设置了一个带有鱿鱼代理的堡垒主机。它看起来像这样:
My host -> bastion -> private cloud
Run Code Online (Sandbox Code Playgroud)
常规 kubectl 命令可以按预期抛出代理:
$ HTTPS_PROXY=socks5://127.0.0.1:1080 kubectl get pods
No resources found.
Run Code Online (Sandbox Code Playgroud)
问题是当尝试 ssh 到 pod 时:
$ HTTPS_PROXY=socks5://127.0.0.1:1080 kubectl exec -it "some-pod" -- /bin/bash
error: error sending request: Post https://<master-ip>/api/v1/namespaces/ns/pods/some-pod/exec?command=%2Fbin%2Fbash&container=xxx&container=xxx&stdin=true&stdout=true&tty=true: EOF
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?