Articles of apache 2.2

ssl_error_log apache问题

https:// localhost工作,但https:// ipaddress没有 猫日志/ ssl_error_log [Mon Aug 02 19:04:11 2010] [error] [client 192.168.1.158] (13)Permission denied: access to /ajaxterm denied [root@space httpd]# cat logs/ssl_access_log 192.168.1.158 – – [02/Aug/2010:19:04:11 +0530] "GET /ajaxterm HTTP/1.1" 403 290 [root@space httpd]# cat logs/ssl_request_log [02/Aug/2010:19:04:11 +0530] 192.168.1.158 SSLv3 DHE-RSA-CAMELLIA256-SHA "GET /ajaxterm HTTP/1.1" 290 httpd.conf文件 NameVirtualHost *:443 <VirtualHost *:443> ServerName localhost SSLEngine on […]

用于高页面视图的Apacheconfiguration,长会话用户 – KeepAlive和MaxRequestvariables

我目前正在运行一个networking应用程序,可以看到几个(〜15)用户每天login一次,然后让Web应用程序打开,每5分钟自动刷新一次新内容。 每个用户往往会打开约15-18个小时。 然而,在临界质量(〜30-40)的用户,一切都开始大幅放缓,HTTPD进程开始膨胀在内存使用。 我已经添加了一个cron作业,每小时重新启动apache一次,但这只会有所帮助。 所有的内容都是dynamic生成的,新的时间,所以caching页面不是一个选项。 我已经开始使用Timeout,MaxRequest和KeepAlive选项,但任何指导都将不胜感激,因为过去我一直将这些选项留在默认值上。 这是我的。 任何Apache天才有如何优化这个configuration上述情况的想法? 我认为很长的超时是很好的,因为加载时间有时会变得非常高。 # Timeout: The number of seconds before receives and sends time out. Timeout 200 # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. KeepAlive On # MaxKeepAliveRequests: The maximum number of requests to allow […]

Apache不会回来 – httpd已经死了,但是子系统已经locking了

我希望有人能够相当紧急地帮助我。 我一直试图让我的Centos服务器备份和运行。 我昨天做了一个yum更新按计划进行,但今天早上我发现httpd已经死了(我正在猜测logrotate)。 我可以发出一个“服务httpd开始”,它似乎开始确定,但状态显示“httpd已死,子弹被locking”。 我可以删除子锁,然后重新开始,但是我得到: “(98)已经使用的地址:make_sock:无法绑定到地址0.0.0.0:80 没有可用的sockets,closures 无法打开日志“ 然后运行netstat -plant显示正在运行的httpd tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8191 / httpd tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 8191 / httpd 我可以从我的httpd.conf中删除Listen 80,并删除第一个错误,但它显示:“(98)已经在使用的地址:make_sock:无法绑定到地址0.0.0.0:443 没有可用的sockets,closures 无法打开日志“ 在我的configuration文件中没有443条目吗? 也运行tail -f / var / log / messages我得到一个令人担忧的条目: www内核:httpd [8189]:segfault在0 ip b7367c48 sp bf89f4fc错误4在libc-2.5.so [b72f8000 + 152000] 请任何想法? 你的,克里斯

Apache htaccess – > Nginx重写

请帮我写下nginx重写,而不是Apache htaccess: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)([^/])$ $1$2/ [R,L] RewriteCond %{ENV:REDIRECT_RDR} ^$ RewriteCond %{HTTP_HOST} ^(.+)\.site\.com$ #RewriteCond %2 !www RewriteCond %{HTTP_HOST} !^www\.site\.com$ RewriteRule ^([a-zA-Z0-9`~!@#$%^&()\-+";=\\/|]*)$ blogs/fake/%2/$1 [L,E=RDR:1] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !/urlrewriteprepend.php$ RewriteRule ^(.*)$ /urlrewriteprepend.php [L]

让Apache将所有urlredirect到不同的主机

我想redirect从主机a.myhost.com所有的URL到b.myhost.com。 我已经探索了所有的选项 – Apacheredirect,重写指令。 我希望redirect发生在相同的目标url – 这是http://b.myhost.com – 无论原始url是什么(egamyhost.com/a.html)。 所有声称能够做到这一点的例子,实际上并没有(至less在我的Apache安装上)。 a.html被转发给redirect的主机 – 这不是所期望的。 有任何想法吗?

SVN + Apache2 mod_dav。 “302redirect,请重新定位”

我的虚拟主机configuration: <VirtualHost *:443> ServerName test1.site.com DocumentRoot /var/www/test1.site.com <Location /svn> DAV svn SVNListParentPath on SVNParentPath /opt/svn </Location> SSLEngine on SSLCertificateFile /etc/apache2/ssl/server.pem SSLCertificateKeyFile /etc/apache2/ssl/server.key 我用命令创build了回购站: svnadmin create /opt/svn/reponame 当我将浏览器指向https://site.com/svn时,它会显示我的所有项目和文件,即可。 检查时出错: $ svn checkout https://test1.site.com/svn/ ./ svn: Repository moved temporarily to 'https://test1.site.com/svn/'; please relocate $ svn checkout https://test1.site.com/svn/projectname ./ svn: Repository moved temporarily to 'https://test1.site.com/svn/projectname/'; please relocate $ […]

为什么我的服务器性能如此糟糕

我有一个在我的开发服务器上运行symfony + wordpress的应用程序。 开发服务器运行在webfaction的最低计划,这是一个共享服务器,给我80MB的RAM。 该网站通过mod_fcgid运行Apache。 现在,该应用程序在该服务器上运行相当快。 我跑了一个基准testing: ab -n 1000 -c 10 http://devserver/ 并得到6.33个请求/这并不是最大的,但是这个网站似乎速度不够快。 我把网站移到了一个登台服务器,这是一个VPS的以下规格: > sysctl hw.physmem 3212058624 > sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu' hw.machine: i386 hw.model: Intel(R) Xeon(TM) CPU 3.20GHz hw.ncpu: 2 hw.machine_arch: i386 所以它看起来像一个相当健壮的机器。 我正在运行apache + mod_php,基本上是开箱即用的。 有时速度有明显的差异。 有时候,速度有非常明显的差别。 我尝试了同样的基准testing,只有20分之一才决定太多。 每隔一段时间,速度是可以接受的,但是我会回到开发服务器,并提醒我可以运行多快。 任何原因为什么应用程序将在一个高级的盒子上运行这么慢?

使用MySQL身份validation设置SVN服务器

最近几天,我一直在尝试使用MySQL身份validation来设置我的家庭SVN服务器。 我相信我已经安装了所有的应用程序,并希望一切都configuration正确…但它仍然无法正常工作。 我正在运行一个Debian服务器,svn 1.5.1和apache2。 这是我的dav_svn.conf文件: <Location /svn> DAV svn SVNParentPath /var/svn-repos AuthBasicAuthoritative Off # our access control policy AuthzSVNAccessFile /var/svn-access/accessfile AuthMYSQL on AuthMySQL_Authoritative on AuthMySQL_DB svn AuthMySQL_Password_Table users AuthMySQL_Username_Field login AuthMySQL_Password_Field pass AuthMySQL_Empty_Passwords off AuthMySQL_Encryption_Types Crypt_MD5 # try anonymous access first, resort to real # authentication if necessary. Satisfy Any Require valid-user AuthType Basic AuthName […]

什么是WordPress和UNIX权限问题的处理?

我正在设置几个wordpress安装,并习惯性地遇到权限问题。 我怀疑主要的问题是,我不是一个共享的宿主环境,只是一个普通的Ubuntu虚拟机,所以无论默认设置在Ubuntu上是不是WP期望。 问题的例子: 升级失败,因为Apache没有写入权限的WP安装 主题和其他上传失败,因为创build的新文件夹具有错误的组成员身份或权限 无法创build目录wordpress / wp-content / upgrade 到目前为止,我不得不修改Apache的默认umask修复2,chmod setgroupid位修复1,我现在正在调查3.我的猜测是,它不应该是这么难。 我是否缺less一些明显的configuration设置? 我为每个class级的用户设置了一个wordpress安装程序,以减less附带的伤害,同时允许团队合作和修补,所以chmod 777和其他头部入侵方法比现状更糟糕。

Apache ModRewrite不能和foo.com一起工作,但可以和www.foo.com一起使用

当我使用foo.org时,无法触发RewriteCond%{HTTP_HOST}。 它似乎忽略它,但www.foo.org和sub.foo.org似乎触发重写条件。 我可能错过了一些简单的东西,并希望有一些更有经验的眼睛能够帮助。 <VirtualHost *:80> ServerName foo.org ServerAlias sub.foo.org www.foo.org DocumentRoot /var/www/ RewriteEngine On RewriteCond %{HTTP_HOST} ^www.foo.org$ RewriteRule ^/(.*)$ http://sub.foo.org/$1 [L,R] 我试过这3个设置(replace上面的) RewriteCond %{HTTP_HOST} ^www.foo.org$ RewriteRule ^/(.*)$ http://sub.foo.org/$1 [L,R] # WORKS 🙂 RewriteCond %{HTTP_HOST} ^sub.foo.org$ RewriteRule ^/(.*)$ http://www.foo.org/$1 [L,R] # WORKS 🙂 RewriteCond %{HTTP_HOST} ^foo.org$ RewriteRule ^/(.*)$ http://sub.foo.org/$1 [L,R] # DOESN'T WORK!!! 这对我来说真是令人沮丧,因为它看起来很简单,但我无法弄清楚。 有没有人有任何想法? 所有的DNS条目设置(我可以直接从浏览器访问所有这些网站,只是redirect被打破)。 […]