Apache2给出500个内部服务器错误 [英] Apache2 gives 500 Internal Server Error
本文介绍了Apache2给出500个内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的服务器有问题.它给出了500个内部服务器错误.
I've problem with my server. It gives 500 Internal Server Error.
在domains-available下,我的domain.conf看起来像这样:
My domain.conf looks like this under sites-available:
<VirtualHost *:80>
ServerName domain.com
ServerAdmin hello@domain.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我的apache2.conf看起来像这样:
And my apache2.conf looks like this:
<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文件如下所示:
And my .htaccess file looks like this:
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个间隔服务器错误.
I don't understand where the problem is. It gives 500 Interval Server Error.
您能帮我吗?
最诚挚的问候.
推荐答案
基于您的日志:
尝试一下:
a2enmod expires
或
ln -s /etc/apache2/mods-available/expires.load /etc/apache2/mods-enabled/
然后
service apache2 restart
这篇关于Apache2给出500个内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文