我在本地networking上运行不同服务器上的几个网站。 所有的网站都是通过一个服务器进行代理的,在这个服务器上添加HTTPS,并监控stream量。 目前,如果有人提出: curl -I subdomain.domain.tld 结果是: curl -I https://subdomain.domain.tld HTTP/1.1 200 OK Date: Fri, 13 Jan 2017 09:19:02 GMT Server: Jetty(8.yz-SNAPSHOT) Content-Type: text/html Content-Length: 2379 Last-Modified: Tue, 10 Jan 2017 11:15:29 GMT 我怎样才能“覆盖”代理服务器与另一个来自ReverseProxy的响应的响应? 例如,我希望我的输出看起来像这样(如果可能的话) curl -I https://dubdomain.domain.tld HTTP/1.1 200 OK Date: Fri, 13 Jan 2017 09:19:02 GMT Server: Apache24 (or even something else) Content-Type: […]
在Apache中进行以下工作时遇到了一些困难: 我们有一个坐在AWS ELB后面的apache / tomcat实例。 ELB正在做SSL终止,所以我们在服务器上有一个redirect来处理这个问题。 我需要/health可以通过HTTP ELB健康检查工作。 我需要将所有不是/ theme东西发送到tomcat ie /foo代理到localhost:8080/foo 。 我已经尝试了使用mod_proxy和/或mod_rewrite下面的configuration的一些变化,但我似乎无法得到这个工作正常,所以将不胜感激任何指针。 <Location /health> ProxyPass http://localhost:8080/health ttl=1 ProxyPassReverse http://localhost:8080/health </Location> <Location ~ "^/(.+)"> RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} =https RewriteCond %{REQUEST_URI} !^/(health|theme)/ RewriteRule . http://localhost:8080/$1 [P] ProxyPassReverse http://localhost:8080/$1 </Location> <Location /> RewriteEngine On RewriteCond %{REQUEST_URI} !^/health RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule . https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent] </Location> […]
当一个不存在的PHP脚本被请求时,mod_proxy_fcgi提供了一个相当无用的错误信息,基本上只是说 [proxy_fcgi:error] …. AH01071: Got error 'Primary script unknown\n' 这台服务器使用Apache 2.4.6(Centos 7),php处理configuration为: <FilesMatch \.php$> SetHandler "proxy:fcgi://127.0.0.1:9000" </FilesMatch> 我真的很想知道实际的脚本名称,因为它可能包含有用的信息(例如,指示有缺陷的链接,页面名称中的错误,或仅仅表明它只是另一个愚蠢的寻找服务器与不受保护的WP – login.PHP)。 我试图从信息更改LogLevel进行debugging,但是然后错误日志也充满了有效的PHP脚本访问细节,这使得错误日志相当混乱,因为这些都不是实际的错误。 有没有办法获得更有用的proxy_fcgi错误消息,其中包括不存在的PHP脚本的实际脚本名称?
我希望用户能够从任何计算机访问phpMyAdmin。 有多个用户,我想要求login。 只有远程访问肯定是可以的。 (我所需要做的就是使用远程地址。)远程访问是必需的。 我已经build立了PHP 7.0.13和4.6.5.2 phpMyAdmin(XAMPP)的Apache 2.4.23服务器。 我已经build立了多个账户访问MySQL,并testing每个人可以login和注销本地主机(也是在不使用的时间限制后自动注销)。 当我转移到远程访问phpMyAdmin,phpMyAdmin自动login到root帐户,无法注销。 注销button在那里,但描述是“清除会话数据”,这就是它所做的一切。 我一直在寻找几天的答案,并可以保证更改auth_typeconfiguration或http不能解决它。 我发现的其他解决scheme都没有任何效果。 更新:我设置root和pma的密码,它在本地主机上正常工作。 远程访问引发访问被拒绝的错误。 这是我的config.inc为phpMyAdmin(我已经testing了许多变化上部.. auth_type等): <?php /* * This is needed for cookie based authentication to encrypt password in * cookie */ $cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */ /* * Servers configuration */ $i […]
我已经使用mod_wsgi在Apache(httpd)中部署了Python Web应用程序(使用金字塔)。 启动Apache服务后,当我们向Web应用程序发出http请求时,会发生下面的错误(来自Apache日志)… [Mon Feb 06 16:38:55.980119 2017] [wsgi:error] [pid 16031] [remote 172.16.13.1:204] mod_wsgi (pid=16031): Target WSGI script '/usr/local/lb/ve32/src/LBGenerator/lbgenerator.wsgi' cannot be loaded as Python module. [Mon Feb 06 16:38:55.980205 2017] [wsgi:error] [pid 16031] [remote 172.16.13.1:204] mod_wsgi (pid=16031): Exception occurred processing WSGI script '/usr/local/lb/ve32/src/LBGenerator/lbgenerator.wsgi'. Traceback (most recent call last): File "/usr/local/lb/ve32/src/LBGenerator/lbgenerator.wsgi", line 1, in <module> from […]
当我尝试启动Apache2时,如果我这样做会失败 Apache2 -e Debug 它出现了这些错误 [Thu Feb 09 09:46:08.244772 2017] [core:warn] [pid 16287] AH00111: Config variable ${APACHE_RUN_DIR} is not defined [Thu Feb 09 09:46:08.245358 2017] [core:warn] [pid 16287] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Thu Feb 09 09:46:08.245695 2017] [core:warn] [pid 16287] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Thu Feb 09 09:46:08.245764 2017] […]
我pipe理的一个服务器正在被一个糟糕的编码的AWS构build的机器人所困扰,这个机器人不断地切换IP并且似乎卡在一个recursion编码循环中。 我能看到的唯一一致的指纹是每个请求只是一个HEAD请求,每个请求似乎都重新编码了前一个请求。 所以http://someurl.com/?foo=%25bar成为..%2525..变成..%252525.. … %2525252525252525…x1000 ..%252525.. … ..%252525.. 。 以下是我看到的请求types的示例: HEAD http://example.com/?foo=%25bar HEAD http://example.com/?foo=%2525bar HEAD http://example.com/?foo=%252525bar HEAD http://example.com/?foo=%25252525bar HEAD http://example.com/?foo=%2525252525bar HEAD http://example.com/?foo=%2525252525…25bar (x1000) 到目前为止,我一直在使用Cloudflare防火墙来阻止每个IP,但他们保持切换IP。 我怎样才能阻止所有包含子string的HEAD请求(比如%25252525 )? 我正在运行Apache/2.4.6 (CentOS) 。
我有一个有3个networking接口的linux服务器,一个用于局域网,另一个用于广域网(IPv4和IPv6)。 到目前为止,apache被configuration为使用80上的单个虚拟主机为external.domain.com (作为ServerName )和internal.domain.local (作为ServerAlias )提供同一个网站。 我现在已经获得了external.domain.com的证书,并用mod_rewrite重新configuration了虚拟主机,以将HTTP请求redirect到HTTPS。 从外部访问该网站时,效果很好。 但是,由于网站是用不同的主机名访问的,所以我认为来自局域网的请求应该使用普通的HTTP。 我是否需要创build一个单独的虚拟主机,或者我可以处理一切只有一个? 这是我目前的configuration: <VirtualHost *:80> ServerName external.domain.com RewriteEngine on ReWriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] </VirtualHost> <IfModule mod_ssl.c> <VirtualHost *:443> ServerName external.domain.com ServerAlias internal.domain.local Header always add Strict-Transport-Security "max-age=15768000" DocumentRoot /data/htdocs/site1 <Directory /data/htdocs/site1> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/site1-error.log LogLevel […]
我最近进入了Apache,我试图做一些我不知道该怎么做。 我有两个网站:siteA和siteB。 SiteA可以访问他的网站和SiteB。 另一方面,SiteB只能访问他的网站。 接下来我要做的是允许siteB访问siteA,但是他只能访问test. *文件,而不是别的。 这是我迄今为止。 <Directory "/var/www/htdocs/siteA"> options indexes order allow,deny allow from 10.50.19 </Directory> <Directory "/var/www/htdocs/siteB"> options indexes order allow,deny allow from 10.50.19 allow from 10.51.19 </Directory> 感谢您的帮助!
我有两台服务器,私有IP,Apache 2.4。 我在两台服务器上都提供相同的内容,在这些服务器前面有一个负载平衡器。 负载平衡器使用公共IP,并且有一个与其关联的域(mycompany.com)。 然而,客户购买了一个新的域,并希望使用相同的服务器来提供新的内容。 据我所知,我需要configurationVirtualHosts。 我已经阅读了有关VirtualHosts的文档,似乎是基于名称的虚拟主机的情况。 但是由于主机名的公共IP与平衡器相关联,我不知道如何configuration私有服务器才能知道如何解决要提供的内容。 感谢指导。