Articles of apache 2.4

Apache分段错误:如何用gdb获取更多的信息?

我在apache的error_log中看到以下错误。 它是完全随机的,但是当它发生时,它会在error_log中打印10-20行。 Apache: [core:notice] [pid ***] AH00052: child pid *** exit signal Segmentation fault (11) 我正在运行Apache 2.4.12和PHP 5.4.36。 我试图用gdb 7.8来收集更多的信息。 附加到apache的进程后,我等待,最后得到了一个分段错误: (gdb) attach 205907 Attaching to process 205907 Reading symbols from /usr/local/apache2/bin/httpd…done. Reading symbols from /lib64/libpcre.so.0…(no debugging symbols found)…done. … lots of reading symbols … (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x00007f7508acc4fe […]

使用puppet-apache模块安装apache时出错

我使用puppet实验室的apache模块来安装和configurationapache。 我使用的是Debian 7(wheezy),下面是我在puppet-master中用作site.pp的清单文件。 从puppet客户端执行puppet apply –test安装apache。 但是我得到错误。 node 'debian.yaalie.com' { class {'apache': } apache::vhost { 'debian.yaalie.com': port => '80', docroot => '/var/www/' } } 错误: Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=–force-confold install apache2' returned 100: Reading package lists… Building dependency tree… Reading state information… The following extra packages will be installed: apache2-mpm-worker apache2-utils […]

Mediawiki迁移现有的维基页面shortURL没有反感SEO(维护旧链接)

遵循以下步骤: http://www.mediawiki.org/wiki/Manual:Short_URL http://www.mediawiki.org/wiki/Manual:Short_URL/Apache 我已经从url迁移了我的维基页面: http://acacha.org/mediawiki/index.php/ARTICLENAME 至 http://acacha.org/mediawiki/ARTICLENAME 例如,现在看到Apache的文章,你可以去: http://acacha.org/mediawiki/Apache 但现在我的问题是以下旧链接: http://acacha.org/mediawiki/index.php/Apache Mediawiki将其解释为名为“index.php / Apache”的文章。 我不介意不能写index.php开始的文章/但对于SEO是非常重要的旧链接redirect到新的链接。 例如,我想从URLredirect: http://acacha.org/mediawiki/index.php/Apache 至 http://acacha.org/mediawiki/Apache 我目前的configuration是: Apache VirtualHost(文件/etc/apache2/conf-available/mediawiki.conf)。 跟随: ServerName acacha.org ServerAlias www.acacha.org DocumentRoot /var/lib/acacha_mediawiki php_value upload_max_filesize 20M #DOES NOT WORK: #AliasMatch ^/mediawiki/index.php(.*) /var/lib/acacha_mediawiki/w/index.php <Directory /var/lib/acacha_mediawiki/> #If this is uncommented new files uploaded give a Forbidden Error. Example: # http://acacha.org/mediawiki/upload/c/c0/Francesc_fores_identity.png –> […]

为什么Apache的setEnvIf没有设置正确的头文件,以及如何进行debugging

我有我的.htaccess文件中的以下内容: <IfModule mod_headers.c> SetEnvIf Origin "http(s)?:\/\/(www\.)?(inreado\.local|testenv\.inreado\.com|inreado\.com)$" AccessControlAllowOrigin=$0$1 Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin Header set Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS" Header set Access-Control-Allow-Credentials true </IfModule> 我试图设置Access-Control-Allow-Origin头,如果主机是在正则expression式中指定的三个允许的域之一。 但它从来没有设置这个标题。 这是请求和回应: 请求 GET http://inreado.local:8080/ HTTP/1.1 Host: inreado.local:8080 Connection: keep-alive Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36 Accept-Encoding: gzip, deflate, […]

为什么Apache返回200状态码时返回错误信息

我已经将Apacheconfiguration为在所有使用OPTIONS动词的请求上返回200 RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L] Apache确实返回状态200 OK ,但正文包含错误消息: HTTP/1.1 200 OK Date: Sun, 22 Mar 2015 16:38:10 GMT Server: Apache/2.4.10 (Win64) PHP/5.6.3 Content-Length: 492 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>200 OK</title> </head><body> <h1>OK</h1> <p>The server encountered an internal error or misconfiguration and […]

当使用proxy_pass到Apache时,Nginx会在Host头之前忽略HTTP头

当Nginx发送以下请求时,Apache无法获得“app_version”HTTP头。 我通常使用apache_request_headers()来获取所有标题。 我也检查了$_SERVER的内容 GET /stuff HTTP/1.0 app_version: 1.0 Host: example.com 但是,当发送下面的头文件时, apache_request_headers()会返回“app_version”HTTP头文件! GET /stuff HTTP/1.0 Host: example.com app_version: 1.0 问题是,我正在使用第三方REST客户端(Retrofit),它似乎以随机顺序发送标题,所以我不能简单地通过首先发送主机标头来解决这个问题。 无论如何,我不明白为什么一个带有下划线的标题或者它被放置的顺序会影响任何东西。 (头部格式与HTTP规范兼容)。 我想解决当前的问题,而不是一个解决方法。 我有以下的Nginxconfiguration: underscores_in_headers on; location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_pass http://127.0.0.1:8080; } 什么会导致这种不一致?

如何阻止ApacheBench发送请求到服务器?

我使用Ubuntu 14.10,Apache 2.4。 我的服务器现在正在遭受巨大的DDoS攻击,我尝试使用mod_security,fail2ban并使用iptables手动阻止攻击IP,并且没有任何工作。 攻击者使用“ApacheBench / 2.3”来攻击我的apache2服务器,他们正在向它发送巨大的请求,那么是否有阻止这个工具,并阻止它发送请求给我? 谢谢。

机器人文件的行为

我今天注意到一些奇怪的东西。 如果我去http://www.google.com/robots.txt,IE11会显示我的机器人文件的内容。 但是,如果我去我的网站(仍在开发中)使用相同的浏览器,并指向它robots.txt,IE浏览器询问我是否要打开或保存到磁盘,如果我点击打开,它打开记事本中,而不是浏览器喜欢谷歌的。 是否有什么区别做像谷歌这样的事情(显然有一个不同的文件被提供的方式,所以这两个方法的专业和无线)是什么? 你怎么做到这一点? 我认为AddType / AddHandler与它有关,但我不知道如何去做。 这里是提琴手给我的网站的robots.txt文件: HTTP/1.1 200 OK Date: Thu, 02 Apr 2015 17:16:06 GMT Server: Apache/2.4.9 (Win64) PHP/5.5.12 X-Powered-By: PHP/5.5.12 Content-Disposition: attachment; filename="robots.txt" Content-Length: 33 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/plain User-agent: * Disallow: /images/

Centos 7 / phpmyadmin“禁止访问:您无权访问此服务器上的/ phpmyadmin。”

我在Virtualbox中运行CentOS 7。 Apache的phpMyAdmin.conf: # phpMyAdmin – Web based MySQL browser written in php # # Allows only localhost by default # # But allowing phpMyAdmin to anyone other than localhost should be considered # dangerous unless properly secured by SSL Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin <Directory /usr/share/phpMyAdmin/> AllowOverride All Order Deny,Allow Deny from All […]

无法访问我的Ubuntu服务器端口8443

我尝试使用nmap通过端口8443连接到我的Ubuntu服务器。 PORT STATE SERVICE VERSION 8443/tcp closed https-alt 正如你可以看到的外部世界8443端口似乎是closures的。 但是我的服务器列出端口为LISTENING。 netstat -tulpen: Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp6 0 0 :::8443 :::* LISTEN 0 18180888 – tcp6 0 0 :::443 :::* LISTEN 0 18180884 – 和我的iptables显式允许默认的Drop之前的端口8443: pkts bytes target prot opt in out source destination 0 0 ACCEPT […]