Articles of 反向代理

如何将来自Nginx的请求代理到SSL服务器

我的curl请求如下所示: curl –header "Authorization: Basic BASE_64" https://example.com –tlsv1 -k (我需要明确提供TLS并跳过validation) 它的工作。 我想设置nginx作为中间件和处理远程服务器的身份validation。 location / { proxy_pass {{ remote_server }}; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Authorization "Basic {{ base64_token }}"; } 不幸的是,在这些设置下,我得到了403个禁止。 我在做什么不同于curl请求? 我的error.log显示: 2014/12/20 02:40:12 [error] 15676#0: *13 connect() failed (111: Connection refused) while connecting to upstream, client: MY_OWN_IP, server: _, request: "GET […]

Nginx:将目录redirect到虚拟服务器

我有两个Nginx虚拟服务器: server { listen 80 default_server; server_name antergos1; root /data/ } server { server_name nagios; root /usr/share/nagios/share; } 现在,当请求http://antergos1/nagios时,我需要访问http://nagios服务器。 我需要指定一个proxy_pass和/或重写吗?

NGINX反向代理端口

我试图用nginx来实现一个反向代理。 但以上configuration我得到的是在浏览器中的一个错误的url: http://domain:9080/myLocation/something.html 和我需要的是(没有端口): http://domain/myLocation/something.html 组态: location /myLocation { proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://xptoserver:9080$request_uri; }

为SSLconfigurationApache Httpd和Weblogic

我有一个Apache Httpd作为我的RPS在一些Weblogic和Coherence服务器前运行。 我有rps为sslconfiguration,并且拒绝SSLv3和SSLv2请求。 所以,当我到了具体的url(虚拟IP)的多个服务器,我很好。 我有一个漏洞扫描器,说服务器IP(不同于站点URL)允许SSLv3和SSLv2请求英寸但是当扫描该站点的VIP时,它说我没事,因为Apacheconfiguration。 我的想法是build立Apache和Weblogic for SSL。 这是个好主意吗? 还是我比我更偏执狂? build议?

如何更改haproxy的ftp被动模式ip地址作为备用代理服务器?

我有一个局域网中的ftp服务器,地址是192.168.1.11我用haproxy是因为很多其他的服务需要它 我把haproxy放在我的软路由(192.168.1.1)上(ubuntu 14.04) 我的haproxyconfiguration是: frontend ao3-ftp bind ftp.ao3.com.au:21 bind ftp.ao3.com.au:20 bind ftp.ao3.com.au:5000-5100 default_backend myftp backend myftp server server1 192.168.1.11 当客户端使用FTP服务时,他们发现无法连接的IP地址的问题: Status: Connected, waiting for welcome message… Reply: 220-FileZilla Server version 0.9.41 beta Reply: 220 Hi welcome to Ao3 ftp Server Reply: 200 Don't care Command: USER ingram Reply: 331 Password required for ingram Command: PASS […]

nginx打开反向代理?

不知何故,我不知道如何,我们已经configuration了一个nginx反向代理,作为一个开放的代理。 日志文件告诉我们匹配请求正在与下面的conf文件进行比较: map $http_upgrade $connection_upgrade { default upgrade; '' close; } access_log /var/log/nginx/access.p.log; error_log /var/log/nginx/error.p.log; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_buffers 8 32k; proxy_buffer_size 64k; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; server { listen 80; server_name ~first.*\.second\.com; location / […]

Apache 2.4.12redirectWordPress子文件夹到另一个服务器的IP地址

我在laravel 公共文件夹里面运行wordpress,它是我网站的根。 当访问以下子文件夹时,如何redirect到另一个服务器IP地址,例如(xx.xx.xx.xxx): example.com/forum 另一台服务器运行nginx,将论坛作为唯一的站点。 这里是我的网站的apache虚拟主机configuration: /etc/apache2/sites-available/example.conf <VirtualHost *:80> ServerName example.com ServerAdmin [email protected] DocumentRoot /var/www/example RewriteEngine on ProxyRequests off #Redirect all HTTP requests to HTTPS RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://example.com/$1 [R=301,L] #Redirect forum subdirectory requests to forum server RewriteRule ^/forum$ https://example.com/forum/ [R] [L] RewriteRule ^/forum/(.*) http://xx.xx.xx.xxx/$1 [P] <Directory /var/www/example> AllowOverride all </Directory> </VirtualHost> 应用.htaccess […]

如何跨2个IP地址共享单个域SSL证书

我有一个wordpress网站example.com 。 我有一个可以跨多个服务器使用的域SSL证书。 当用户访问example.com或任何子文件夹期望论坛时,他们访问运行apache的server1 。 当用户访问example.com/forum时,他们被redirect到运行nginx的server2 。 我将如何设置这两个IP地址映射在example.com下,使得redirect只是内部的,并且域始终保持example.com 在我的网站apache虚拟主机,我正在使用 Redirect permanent /forum http://server2ip redirect到server2 编辑根据卢卡的答案将server1设置为PROXY到SERVER2 这里是我的apache虚拟主机configuration的设置 VirtualHost *:80> RewriteEngine on ServerName example.com ServerAdmin [email protected] DocumentRoot /var/www/example #Redirect all HTTP requests to HTTPS # RewriteCond %{SERVER_PORT} 80 # RewriteRule ^(.*)$ https://example.com/$1 [R=301,L] ProxyPass /forum https://server2ip/ <Location /forum> ProxyPass https://server2ip/ ProxyPassReverse https://server2ip/ </Location> <Proxy *> Order allow,deny […]

我如何使用Nginx来保护不安全的meteor?

我在AWS上运行一个不安全的Meteor。 对于那些不熟悉Meteor的人来说,这意味着我正在使用“不安全”的软件包,这个软件包用于快速原型开发。 我只需要我们的开发团队和利益相关者访问服务器。 过去,我通过在防火墙上列出每个人的IP地址来解决这个问题。 现在这个团队有点大,收集每个人的IP地址可能很难做到。 所以我想用Nginx来密码保护Meteor。 我知道如何密码保护的HTML; 但meteor使用Websockets,我完全不熟悉。 我如何密码保护websockets?

Apache“随机”丢失VirtualHostconfiguration

我希望有人能够解释这个问题,我没有在别处解决的运气。 我们正在运行一个用于基本负载平衡的Apache(2.2.15)服务器,但最终使用ProxyPass指令到我们的各种后端服务器。 问题似乎是Apache“随机”不再具有正确加载的特定虚拟主机文件(或者更可能是我们在不知不觉中造成这种情况),并且我们正在看到来自Apache的404s或代理错误。 在error_log中没有错误,我也确认httpd -S仍然显示虚拟主机加载,但好奇的是,如果我发出一个httpd重新加载,它又开始工作。 该服务器有〜2GB的可用内存。 我们在我们的httpd.conf文件中包含了vhosts / active指令,并且在那个目录中有符号链接到实际的vhostconfiguration文件(不要相信这是相关的但是想要透露),而且我们正在加载大约40个不同的vhost CONFIGS。 下面是一个例子,从一个特别的发生相对比较顺利(也可能值得一提的是,似乎只有像这样的确定的虚拟主机文件): <VirtualHost 10.10.0.77:80> ServerName url.mysite.com ServerAlias url Options +FollowSymLinks ProxyPreserveHost On ProxyPass / http://hostname.internaldomain.local:8081/ ProxyPassReverse / http://hostname.internaldomain.local:8081/ </VirtualHost> <VirtualHost 10.10.0.77:443> ServerName url.mysite.com ServerAlias url RewriteEngine On SSLEngine on SSLProxyEngine on SSLProxyVerify none SSLCertificateFile /etc/httpd/conf/ssl/mycert.com.crt SSLCertificateKeyFile /etc/httpd/conf/ssl/mycert.key SSLCertificateChainFile /etc/httpd/conf/ssl/mycert_chain.crt Options +FollowSymLinks ProxyPreserveHost On ProxyPass / http://hostname.internaldomain.local:8081/ […]