Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/247.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 重写引擎打开-内部服务器错误_Php_Linux_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Php 重写引擎打开-内部服务器错误

Php 重写引擎打开-内部服务器错误,php,linux,apache,.htaccess,mod-rewrite,Php,Linux,Apache,.htaccess,Mod Rewrite,我对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 R

我对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>
<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>

选项-多视图+符号链接所有者匹配
#重新启动发动机
重写base/var/www/git
重写cond%{REQUEST_FILENAME}-F
重写规则^(.*)$index.php/$1[L,NC]
命令允许,拒绝
全盘否定
当我取消对#RewriteEngine On的注释时,会出现内部服务器错误

Apache中可用的Me站点如下所示:

<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>
<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>

服务器管理员webmaster@localhost
DocumentRoot/var/www/git
ServerName git.server.com
别名/git/var/www/git
RewriteLog/var/log/apache2/rewrite.log
重写日志级别5
选项如下符号链接
允许超越所有
命令允许,拒绝
通融
ErrorLog${APACHE_LOG_DIR}/error.LOG
#可能的值包括:调试、信息、通知、警告、错误、临界值、,
#警惕,埃默格。
日志级别警告
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
你有办法解决这个问题吗?
谢谢

通过将/var/www/git替换为/


无论如何,感谢您的建议。

通过将/var/www/git替换为/


无论如何,谢谢你的建议。

你检查过你的服务器错误日志吗?当然有,例如:[Mon Aug 31 13:28:00 2015][error][client 192.168.0.23]文件不存在:/var/www/git/refresh,referer:等等。没有更多有用的信息。该文件不存在,这是真的,但在本例中有htaccess。我想…你检查过你的服务器错误日志了吗?当然有,例如:[Mon Aug 31 13:28:00 2015][error][client 192.168.0.23]文件不存在:/var/www/git/refresh,referer:和许多类似的文件。没有更多有用的信息。该文件不存在,这是真的,但在本例中有htaccess。我想。。。