我写了一个简单的命令行程序,打开浏览器并将数据发布到给定的url。 由于某种原因一旦请求到达我的apache服务器,apache看到的是发布数据,但是没有发送给PHP。 当试图 echo var_dump($ _ POST,true) 我看到一个空的数组。 我已经设置mod_dumpio,可以看到进来的请求和POST数据肯定是存在的(我加倍间隔显示apache接收发布数据的行,所以它更容易find下面): [Thu Jul 07 08:24:48 2016] [notice] Apache/2.2.22 (Debian) PHP/5.4.36-0+deb7u3 configured — resuming normal operations [Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes [Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 17 bytes [Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: […]
当虚拟主机站点打开一分钟或更长时间(由于站点代码不正确),以及在其ddos(服务器负载平均值> 100)或Apacheclosures时,如何让nginx显示页面“Site down”别的东西? Apache(2.2 FreeBSD)在127.0.0.1上运行了很多VirtualHost。 现在我有这样的nginx.conf: server { listen 80; server_name localhost; error_page 404 /404.html; error_page 500 502 /apache_down.html; error_page 503 504 /site_down.html; location / { proxy_pass http://127.0.0.1:88; 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_connect_timeout 5; proxy_read_timeout 6; proxy_send_timeout 6; proxy_intercept_errors off; } location = /404.html { root /usr/local/www/apache22/data; } location = […]
我configuration了Apache Web服务器,它将请求传递给上下文根/ 2d上的Weblogic App Server ProxyPass /2d http://exlhamppatgc.2degreesmobile.co.nz:7003/2d ProxyPassReverse /2d http://exlhamppatgc.2degreesmobile.co.nz:7003/2d 现在我想要从Apache提供静态文件(gif | jpg | png | jpeg | css | js | swf),请先从Apache htdoc文件夹中提供请求。 如果文件不存在,则查找应用程序服务器。
客户使用Apache HTTP Web服务器( AW )将HTTP请求redirect到Apache Tomcat( AT )。 我需要为AT服务的当前应用程序添加一个特殊的servlet。 这个servlet只会启动一个线程而不做任何事情。 这个线程的唯一目的是侦听传入的TCP连接。 是否有可能将通过AW收到的入站TCP连接redirect到AT ? 所以AW只会作为一个TCP代理。 我更喜欢代理解决scheme,隧道是不可取的,但如果没有其他解决scheme,我会考虑。 我无法控制客户端,期望我遵循严格的基于文本的自定义协议。 [传入连接] Client -> AW -> AT [响应] Client <- AW <- AT
这是SELinux执行时发生的情况: [root@shadmin ~]# elinks –dump 127.0.0.1/ASP-Portal/index.aspx Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. ————————————————————————– Apache/2.2.15 (Red Hat) Server at 127.0.0.1 Port 80 [root@shadmin ~]# tail /var/log/httpd/error_log [Tue Aug 09 17:27:00 2016] [notice] caught SIGTERM, shutting down [Tue Aug 09 […]
当我试图运行Apache2重新加载,我得到以下错误。 我究竟做错了什么? /etc/apache2# journalctl -xn — Logs begin at So 2016-08-07 18:21:40 CEST, end at Do 2016-08-18 12:33:31 CEST. — Aug 18 12:28:58 nma apache2[23097]: Reloading web server: apache2 failed! Aug 18 12:28:58 nma apache2[23097]: Apache2 is not running … (warning). Aug 18 12:28:58 nma systemd[1]: apache2.service: control process exited, code=exited status=1 Aug 18 12:28:58 […]
我在安装在我的网站上的第三方JavaScript游戏遇到问题,在那里返回的内容types响应头是application/json而不是application/javascript ,被请求的资源是jsonp。 这似乎不是在Safari或Firefox的问题,但它在Chrome中抛出一个错误。 我在控制台中得到的错误是Refused to execute script from 'http://example.come/js/game/data/game-data.json' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled. 基于一个推荐的configuration ,我已经尝试将以下内容添加到游戏根目录中的.htaccess文件,但它似乎没有任何影响: <IfModule mod_mime.c> AddType application/javascript jsonp </IfModule> 我已经确认在我的httd.conf文件中启用了LoadModule mime_module modules/mod_mime.so 。 有其他设置我需要尝试?
我刚刚在运行apache的CentOS 6服务器上设置了letsencrypt ,SSL全部正常。 我只是试图redirecthttp到https使用这个: Redirect permanent / https://example.com/ 但是,在去http://example.com/somepath的情况下,而不是获取https://example.com/somepath我得到https://example.comesomepath … 出于某种原因, /未被添加到我正在访问的path,我看不到我可以如何解决这个问题。 我的httpd.conf : NameVirtualHost *:80 <VirtualHost *:80> ServerName example.com ServerAlias example.com DocumentRoot /var/www/html/ # RedirectMatch permanent ^(.*)$ https://www.example.com$1 # tried using this too, no luck Redirect permanent / https://example.com/ </VirtualHost> 运行: Apache/2.2.15 (Unix)
我已经使用apt-get install nagios3在Raspbian Wheezy上安装了Nagios Core 3.4.1 。 Webserver是Apache 2.2.22 。 安装完成没有错误,当我尝试访问/nagios3我得到提示input用户名和密码。 提供正确的凭据会导致页面中断并出现错误: Not Found – The requested URL /nagios3/< was not found on this server. 。 类似的错误也被logging到/var/log/apache2/error.log : File does not exist: /usr/share/nagios3/htdocs/<, referer: http://192.168.1.2/nagios3/ 目录/usr/share/nagios3/htdocs/存在并包含诸如index.php文件。 目录和文件,由root拥有,可以被www-data读取,但是<从哪里来? 我认为这是错误的path。 在/etc/nagios3/apache.confconfiguration看起来不错。 没有额外的<如行: Alias /nagios3 /usr/share/nagios3/htdocs 我在/etc/apache2/sites-enabled/000-default上configuration了其他网站。 configuration很简单,只需将文档根目录设置为/var/www 。 难道它会和Nagios混淆吗? 我已经testing了Nagios的apache.conf中定义的所有别名,如果我通过手动inputurl来尝试访问它们,它们都可以工作。 编辑: 我试图用自定义的HTML和PHP索引文件replace/usr/share/nagios3/htdocs/index.php 。 我的testing文件加载没有问题。 事实certificate,当检查php ,检查了错误的页面,实际上它不工作,导致了这个问题。
参考: 正确的方法来阻止一个网站,如果一个cookie不存在apache 2.4 我们遵循了答案,但没有奏效。 当cookie不存在(或包含正确信息)时,我们希望redirect到另一个页面。 我们试过这个: RewriteEngine on RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 RewriteRule .* – [R=503,L] 以上作品为负面条件。 我们尝试了这些例子(我们必须改变url才能发布问题): RewriteCond %{HTTP_COOKIE} !abc_f8Dple7LxGXcSUgHjFrx RewriteRule .* www.example.co.uk/no-access [R=301,L] RewriteCond %{HTTP_COOKIE} !^abc_f8Dple7LxGXcSUgHjFrx=([^;]+) RewriteRule .* www.example.co.uk/no-access [R=301,L] RewriteCond %{HTTP_COOKIE} !^abc_f8Dple7LxGXcSUgHjFrx RewriteRule .* www.example.co.uk/no-access [R=301,L] RewriteCond %{HTTP_COOKIE} !abc_f8Dple7LxGXcSUgHjFrx=([^;]+) RewriteRule .* www.example.co.uk/no-access [R=301,L] 这些都没有工作。 如果我们删除! 符号(使其成为一个积极的条件),他们的工作。 有人可以帮忙吗? 我们希望得到这个在Apache 2.2和2.4上的工作,因为我们无法在两者上工作。