apache配置差点把我给弄死。

来源:互联网 发布:vb 替换加密 编辑:程序博客网 时间:2024/04/28 18:48

配来配去总是不对,老是被mod_python伺服了,却找不到优先级。上了下厕所,想了一下,觉得会不会有.htcaccess在目录下呢。回来一查,发现果然有个.htcaccess文件躲在目录里面。

搞定之后,这下报错不错了,没有权限,DirectorIndex也不能生效,郁闷,这下试来试去没撤了。试着把sethander去掉,哈哈,一下全可以了,这里真他妈没有想通,php是默认支持的,不用写sethander,但是以前配django时,里面有一个目录要配置成支持php,就要这个选项。现在把我的配置备份一下。

NameVirtualHost 61.152.122.165:80ServerAdmin 8863824@gmail.comServerName www.daybang.comDocumentRoot /home/www/daybangOptions Indexes FollowSymLinks MultiViewsAllowOverride NoneOrder allow,denyallow from allOrder Deny,AllowAllow from allSetHandler NoneErrorLog /var/log/apache2/daybang_error.logLogLevel warnCustomLog /var/log/apache2/daybang_access.log combinedServerSignature OnSetHandler python-programPythonHandler django.core.handlers.modpythonPythonPath "sys.path+['/home/www']+['/home/www/Django-0.96']"PythonDebug OnSetEnv DJANGO_SETTINGS_MODULE daybang.settingsAlias /media /home/www/daybang/mediaAlias /medias /home/www/daybang/mediasAlias /tenpay /home/www/daybang/tenpaySetHandler NoneSetHandler NoneSetHandler application/x-httpd-phpOrder Deny,AllowAllow from allServerAdmin 8863824@gmail.comServerName www.hhuai.cnServerAlias hhuai.cn hn-go.com www.hn-go.comDirectoryIndex index.php index.htmlDocumentRoot /home/www/hhuai/wordpress#SetHandler application/x-httpd-phpDirectoryIndex index.php index.html#Options Indexes FollowSymLinks MultiViewsAllowOverride NoneOrder allow,denyallow from allSetHandler NoneErrorLog /var/log/apache2/hhuai_cn_error.logLogLevel warnCustomLog /var/log/apache2/hhuai_cn_access.log combined