Articles of apache 2.2

太多的Apache进程,杀死CPU

我注意到太多的apache进程在我的专用服务器上查杀CPU。 14193 (Trace) (Kill) nobody 0 66.1 0.0 /usr/local/apache/bin/httpd -k start -DSSL 14128 (Trace) (Kill) nobody 0 65.9 0.0 /usr/local/apache/bin/httpd -k start -DSSL 14136 (Trace) (Kill) nobody 0 65.9 0.0 /usr/local/apache/bin/httpd -k start -DSSL 14129 (Trace) (Kill) nobody 0 65.8 0.0 /usr/local/apache/bin/httpd -k start -DSSL 13419 (Trace) (Kill) nobody 0 65.7 0.0 /usr/local/apache/bin/httpd -k start […]

apache2 VirtualHost的占位符

我有这样的一个conf <VirtualHost *:80> VirtualDocumentRoot /Users/molfar/Sites/%-2+ </VirtualHost> 我想dynamic设置错误和访问日志path。 我尝试了以下 <VirtualHost *:80> VirtualDocumentRoot /Users/molfar/Sites/%-2+ ErrorLog "/private/var/log/apache2/%-2+_error.log" CustomLog "/private/var/log/apache2/%-2+_access.log" common </VirtualHost> 但占位符在ErrorLog和CustomLog指令中不起作用。 还有其他占位符吗?

多重规则Apache重写和标准页面

参考: 多重规则Apache重写 虽然这对多层次的项目钻取效果很好,但我仍然需要一个admin.php页面来在规则之外运行。 目前在这套规则下,标准页面/脚本不会运行。 思考/想法? RewriteRule ^mr/index.php$ – [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ /mr/index.php?product_group=$1&product_family=$2&product_category=$3&product_sub_category=$4&product=$5 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ /mr/index.php?product_group=$1&product_family=$2&product_category=$3&product_sub_category=$4 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/?$ /mr/index.php?product_group=$1&product_family=$2&product_category=$3 [L] RewriteRule ^([^/]*)/([^/]*)/?$ /mr/index.php?product_group=$1&product_family=$2 [L] RewriteRule ^([^/]*)/?$ /mr/index.php?product_group=$1 [L] 更新: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ – [L] RewriteRule ^index.php$ – [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?n_section=$1&n_product_group=$2&n_product_family=$3&n_product_category=$4&n_product_subcategory=$5 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?n_section=$1&n_product_group=$2&n_product_family=$3&n_product_category=$4 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/?$ index.php?n_section=$1&n_product_group=$2&n_product_family=$3 [L] […]

我的apache2服务器有什么问题?

我编辑文件/ etc / apache2 / sites-enabled / 000-default,然后尝试重新启动我的apache服务器,并出现此错误: Syntax error on line 20 of /etc/apache2/sites-enabled/000-default.save: unknown order Action 'configtest' failed. 这是000默认文件的样子: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None […]

我怎样才能在Ubuntu上手动安装PHP5

我有一个新的VPN与Ubuntu服务器10.04 LTS随附的Mysql 5.1安装,这是不支持Barracuda文件格式,所以我手动安装和configurationMySQL 5.6。 到目前为止,这是完美的。 到目前为止,Apache2也运行良好(没有进行过很多testing,但似乎稳定)。 唯一的问题是PHP5不能识别PDO模块,所以我删除了它。 有没有办法,我可以手动安装PHP5或任何版本的PHP在Ubuntu上? 如果我做apt-get安装php5它说 root@vps:/etc# sudo apt-get install php5 Reading package lists… Done Building dependency tree Reading state information… Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not […]

允许用户只使用不是IP的URL访问Apache

我想让用户只能使用url访问我的apache网站。 如果有人使用IP地址访问它,他应该以某种方式被阻止。 这可以在Apache中完成吗?

某些apache线程的CPU负载是> 10%,其他线程是0.2%

我有一个运行WordPress网站的apache框。 出于某种原因,似乎一些Apache线程正在使用大部分的CPU(10%以上),其余的很less(0.1〜)。 该机箱是双CPU, Intel(R)Xeon(R)CPU E5620 @ 2.40GHz(每个CPU有4个内核和8个线程) 。 线程显示的原因是什么,如果他们不是每个用户的CPU相等? 是否有任何一套Apache优化来帮助减less负载(CentOS,基于PHP和MySQL的Apache2安装)? prefork和工人MPM设置默认下面 # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # ServerLimit: maximum value for MaxClients for the lifetime of the […]

ProxyHTMLURLMapreplace两次给定的URL

解释标题,我已经把这个(这是唯一的htmlUrlMap)在我的conf: ProxyHTMLURLMap / /rp/ticket/ 这在我的HTML: <script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script> 预期的是: <script type="text/javascript" src="/rp/ticket/js/jquery-1.8.3.min.js"></script> 实际产量: <script type="text/javascript" src="/rp/ticket/rp/ticket/js/jquery-1.8.3.min.js"></script> 这是奇怪的…,更多的configuration: <Location /rp/ticket/> ProxyHTMLEnable On ProxyHTMLBufSize 102400 ProxyHTMLExtended On ProxyHTMLStripComments Off ProxyHTMLDocType "<!DOCTYPE html>" ProxyHTMLMeta Off ProxyHTMLCharsetOut * ProxyHTMLURLMap / /rp/ticket/ ProxyPass http://ticket.domain.com/ ProxyPassReverse http://domain.com/ SetOutputFilter INFLATE;proxy-html;DEFLATE RequestHeader unset Accept-Encoding </Location> 我最好的猜测是<location>是问题的原因,它被附加到我的自定义地址,但在改变地址到不同的地方(“/ rp / test”)而不是获得 src="/rp/ticket/rp/test" 我有 src="/rp/test/rp/test" 所以这不是问题 […]

我可以通过提供额外的configuration文件来configurationApache(而不是默认安装的)吗?

我在一个基于Debian的Linux发行版中configurationApache。 我想configuration它,使我的configuration更改不妨碍Apache升级。 我想这样做,我不必编辑分发随附的任何configuration文件。 我知道我可以把我的网站的configuration放在/ etc / apache2 / sites-available目录下,然后用a2ensite启用它们。 同样,我可以使用a2enmod启用我想要的模块。 如果我将新的configuration文件写入/ etc / apache2 / conf-available / ,然后使用a2enconf启用它们,会发生什么? 具体来说,将能够覆盖其他configuration文件中指定的设置。 例如/etc/apache2/apache2.conf指定Timeout 300 。 如果我把Timeout 500放在我的configuration文件中,它是否会覆盖之前的声明? 会有任何使用这种覆盖技术的Apacheconfiguration指令不起作用吗?

在debian上安装bugzilla

我想在debian vm上设置bugzilla。 一切都运行相当顺利,直到我做官方手册build议的testing: ./testserver.pl http://www.localhost/bugzilla 它返回: TEST-FAILED Fetch of images/padlock.png failed Your web server could not fetch http://www.localhost/bugzilla/images/padlock.png. Check your web server configuration and try again. 我所做的事情直到这一点: 改变了bugzilla的localconfig: $webservergroup = 'www-data'; $db_driver = 'mysql'; $db_pass = 'myDemoPass'; 浏览到http://localhost/bugzilla/ results到一个找不到网站的错误。 bugzilla文件夹位于/ var / www / html / 可能是什么原因? 眼镜: Debian 7,Apache2,MySQL,Pearl 编辑:我做了一个新的安装在一个单独的虚拟化的debian干净安装,并达到了一个点,我得到这个错误信息: Syntax error on line […]