2015-06-22 77 views
0

我有我的服务器问题。它给500内部服务器错误。Apache2给500内部服务器错误

我domain.conf看起来是这样下的网站可用:

<VirtualHost *:80> 
     ServerName domain.com 

     ServerAdmin [email protected] 
     DocumentRoot /var/www/html 

     ErrorLog ${APACHE_LOG_DIR}/error.log 
     CustomLog ${APACHE_LOG_DIR}/access.log combined 

</VirtualHost> 

我的apache2.conf看起来是这样的:

<Directory /> 
    Options Indexes FollowSymLinks Includes ExecCGI 
    AllowOverride All 
    Order deny,allow 
    Allow from all 
</Directory> 
<Directory /var/www/html> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride All 
    Order allow,deny 
    allow from all 
</Directory> 

我的.htaccess文件看起来是这样的:

Options +FollowSymLinks -MultiViews 
RewriteEngine On 
RewriteBase/

RewriteCond %{HTTP_HOST} ^(www\.domain\.com|188\.166\.104\.193)$ [NC] 
RewriteRule (.*) http://domain.com/$1 [R=301,L] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule^- [L] 

RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ 
RewriteRule (.*)$ /$1/ [R=301,L] 

RewriteRule ^([^/]+)/$ $1.php [L] 

RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php [L] 

我不明白问题出在哪里。它给出500间隔服务器错误。

你能帮我解答吗?

此致敬礼。

+1

可以为您发布的日志也可能?权限,但不管怎么说...我认为这个帖子可能属于[超级用户](http://superuser.com/) – kainlite

+0

是的.htaccess上的ExpiresActive行存在问题。在这里你可以看到.htaccess的其余部分:http://pastebin.com/nYBivS4r – haybeye

+0

你试过我的答案了吗?结果是什么? – kainlite

回答

1

基于日志:

试试这个:

a2enmod expires 

ln -s /etc/apache2/mods-available/expires.load /etc/apache2/mods-enabled/ 

然后

service apache2 restart