apache配置差点把我给弄死。

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

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

NameVirtualHost 61.152.122.165:80




 
   
    
  

ServerAdmin [email protected]

ServerName www.daybang.com

DocumentRoot /home/www/daybang


  
    

Options Indexes FollowSymLinks MultiViews

AllowOverride None

Order allow,deny

allow from all




  
    
      Order Deny,Allow Allow from all 
    


  
    
      SetHandler None 
    

ErrorLog /var/log/apache2/daybang_error.log

LogLevel warn

CustomLog /var/log/apache2/daybang_access.log combined

ServerSignature On

SetHandler python-program

PythonHandler django.core.handlers.modpython

PythonPath "sys.path+['/home/www']+['/home/www/Django-0.96']"

PythonDebug On

SetEnv DJANGO_SETTINGS_MODULE daybang.settings

Alias /media /home/www/daybang/media

Alias /medias /home/www/daybang/medias

Alias /tenpay /home/www/daybang/tenpay


  
    
      SetHandler None 
    


  
    
      SetHandler None 
    


  
    
      SetHandler application/x-httpd-php Order Deny,Allow Allow from all 
    


 
   




 
   
    
  

ServerAdmin [email protected]

ServerName www.hhuai.cn

ServerAlias hhuai.cn hn-go.com www.hn-go.com

DirectoryIndex index.php index.html

DocumentRoot /home/www/hhuai/wordpress

#SetHandler application/x-httpd-php


  
    
      DirectoryIndex index.php index.html #Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all 
    


  
    
      SetHandler None 
    

ErrorLog /var/log/apache2/hhuai_cn_error.log

LogLevel warn

CustomLog /var/log/apache2/hhuai_cn_access.log combined


 
   

你可能感兴趣的:(apache)