我遇到Linux服务器问题。
配置: Linux服务器3.2.0-4-686-pae#1 SMP Debian 3.2.65-1 + deb7u2 i686
Apache / 2.2.22(Debian)
PHP / 5.4.39-0 + deb7u2
启用ModRewrite(a2enmod)
我htaccess看起来像:
<IfModule mod_rewrite.c>
Options -MultiViews +SymLinksIfOwnerMatch
#RewriteEngine On
RewriteBase /var/www/git
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L,NC]
</IfModule>
<Files config.ini>
order allow,deny
deny from all
</Files>
当我取消注释#RewriteEngine On时出现内部服务器错误
我在Apache中可用的站点看起来像:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/git
ServerName git.server.com
Alias /git /var/www/git
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 5
<Directory /var/www/git>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
您有什么想法来解决这个问题吗? 谢谢
答案 0 :(得分:0)
解决了将/ var / www / git替换为/
无论如何,谢谢你的建议。