Articles of apache 2.2

.htaccess vs chmod

.htaccess和chmod有什么区别? 以及如果有人说这个文件/目录是chmodded的意思是什么? 如何重写我的.htaccess文件在服务器上? 如何改变国防部的权利? 以及如何在Web服务器中使用它们? 1 <IfModule mod_rewrite.c> 2 RewriteEngine On 3 RewriteBase /webcpy/ 4 RewriteRule ^index\.php$ – [L] 5 RewriteCond %{REQUEST_FILENAME} !-f 6 RewriteCond %{REQUEST_FILENAME} !-d 7 RewriteRule . /webcpy/index.php [L] 8 </IfModule> 第5行或第6行的含义是什么?

access_log gzipping临时冻结Apache服务器

我们有一个plesk Linux Centos框。 每天在apache_log gzipping过程中,apache服务器停止响应,直到gzip结束。 这是正常的行为? 或者有没有办法解决这个问题? 更新: 事实certificate,冻结是由与日志轮换相一致的mysql例程引起的。

光油/ Apacheredirect到后端端口8080

我在同一台机器上运行8080上的Apache后端Varnish 2。 一切工作正常,除了一个问题:有时Apache(?)redirect到后端端口:8080,特别是当我使用htaccess。 用户在URL中显示8080端口,Google也在后端端口上爬取我的网站,这是不可取的。 我希望Apache 8080只能在本地主机上进行Varnish访问,而不能redirect或显示后端端口。 什么是防止用户被引导到8080和search引擎拒绝抓取后端的快速方法? 这里是一个例子htaccess线: redirect /promotion /register.php?promotion=june 这会导致www.domain.com/promotionredirect到www.domain.com:8080/register.php?promotion=june

Slackware上的Apache2:VirtualHostconfiguration – 端口8080上的连接被拒绝

我试图在Slackware服务器上configuration虚拟主机,并且遇到了一个小故障。 当我浏览到本地主机或127.0.0.1时,我得到: Forbidden You don't have permission to access / on this server. 我需要完成在8080configurationWebApp。当我浏览到本地主机:8080或127.0.0.1:8080我得到: Unable to connect Firefox can't establish a connection to the server at 127.0.0.1:8080. 一些上下文:我需要在Slackware上复制Debian / Ubuntu的以下指令,并且需要一个手 – 所以这里是Debian版本: 5. sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha 6. sudo a2enmod rewrite deflate 7. sudo a2ensite koha && /etc/init.d/apache2 reload 到目前为止:我的httpd.conf(LoadModule的东西和评论被遗漏了) ServerRoot "/usr" Listen 127.0.0.1:80 […]

Apache服务器phpinfo()显示所有php页面

我已经安装了apache,php和mysql的centOS服务器。 我已经上传了我的db和php页面,但每当我从浏览器中查看php文件时,我都会看到phpinfo()页面,接着是下面的php页面。 有什么build议么??

试图添加另一个域,但我怎样才能debugging,看看是什么问题?

我使用的是Debian 6,我遵循Linode指南来设置LAMP服务器。 http://library.linode.com/lamp-guides/debian-6-squeeze 我已经有1个工作域了,而且我刚刚添加了另外一个,并且由于某种原因它不起作用。 我按照指南中的步骤重新创build了另一个域。 我的域的DNS是指向服务器,我甚至跟踪它。 我不知道什么是错的,我不知道如何debugging它。 Apache的文档说使用/usr/local/apache2/bin/httpd -S ,但我没有这样的目录。

如何提高nginx反向代理的性能?

在nginx中我几乎是个noobie,我真的需要一些帮助。 我使用nginx作为反向代理服务器,主要用作负载均衡器。 我几乎只使用dynamic文件。 后端服务器是apache。 这里是我的httperf结果: 单个apache服务器(1024 mb):每秒300个请求2x 512 MB apache服务器,1个nginx服务器(1024 mb):每秒300个请求2x 1024个Apache服务器,1个nginx服务器(1024 MB):每秒300个请求 看来,我的nginx服务器是瓶颈,但我不知道如何我可以优化它。 在apache后端服务器和nginx服务器上的cpu使用率和ram使用率是最小的,不到10%。 我的目标是find一个很好的方式来扩大和使用负载平衡器,但似乎如果Nginx的请求每秒的请求作为一个单一的Apache服务器有限,那么没有意义…. 我可以得到一些人的帮助吗?

PHP致命错误Zend未捕获的exception

我正在使用Zend Framework 1.11开发一个在Centos服务器上托pipe的站点。 Apache正在运行,而documentroot被设置为“var / www / html / public”。 当我从我的Zend Framework项目中拷贝我的index.php文件到这个目录并浏览到http://www.localhost时什么都没有出现,当浏览到localhost / html / public / index.php时也是如此。 我注意到,Zend Framework文件夹需要被复制到/ usr / share / php / Zend,直到我今晚创build它才存在。 在复制Zend文件夹之后,我的浏览器仍然给出一个空白页面。 我使用了php -f /var/www/html/public/index.php并收到以下错误: PHP Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'parse_ini_file(/var/www/html/application/configs/application.ini): failed to open stream: No such file or directory' in /usr/share/php/Zend/Config/Ini.php:182 Stack trace: #0 /usr/share/php/Zend/Config/Ini.php(202): […]

Web服务器静态资源不被主机caching

我的networking服务器在带宽消耗上有周期性的高峰: 日志显示这些来自单个用户: (ip) – – [31/Aug/2011:20:55:31 -0400] "GET /train/16/32462 HTTP/1.1" 200 12909 (ip) – – [31/Aug/2011:20:55:32 -0400] "GET /css/global.1314709741.css HTTP/1.1" 200 9388 (ip) – – [31/Aug/2011:20:55:32 -0400] "GET /css/battle.1307899664.css HTTP/1.1" 200 1567 (ip) – – [31/Aug/2011:20:55:32 -0400] "GET /js/jquery.pulse.1313994229.js HTTP/1.1" 200 2534 (ip) – – [31/Aug/2011:20:55:32 -0400] "GET /js/jquery-1.6.2.min.1309653547.js HTTP/1.1" 200 91887 (ip) – – […]

服务器域名在浏览器地址栏中被replace为IP地址

我安装了一个LAMP服务器,并设置我的域名parsing到一个合适的IP地址。 但是,当我使用域名连接到服务器时,它在地址栏中显示一个IP地址。 我的/ etc / apache2 / sites-available / default看起来像这样: NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin … ServerName mydomainname.irrelevant.to.the.question DocumentRoot /var/www … 我以为这是应该解决这个问题。 还有什么要求?