我在一个Yii2项目中创建了另一个 Virtualhost ,即使用不同的路由/控制器的cek.adev.co.id
和produk.adev.co.id
。
VirtualHost cek.adev.co.id
<VirtualHost *:80>
ServerName cek.adev.co.id
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/adev.dev/frontend/web"
<Directory "/Applications/XAMPP/xamppfiles/htdocs/adev.dev/frontend/web">
Options Indexes FollowSymLinks Includes ExecCGI
Allow from all
AllowOverride All
Require all granted
Order allow,deny
</Directory>
ErrorLog "logs/cek.adev.co.id.local-error_log"
</VirtualHost>
VirtualHost produk.adev.co.id
<VirtualHost *:80>
ServerName produk.adev.co.id
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/adev.dev/frontend/web/produk"
<Directory "/Applications/XAMPP/xamppfiles/htdocs/adev.dev/frontend/web/produk">
Options Indexes FollowSymLinks Includes ExecCGI
Allow from all
AllowOverride All
Require all granted
Order allow,deny
</Directory>
ErrorLog "logs/produk.adev.co.id.local-error_log"
</VirtualHost>
当我访问 cek.adev.co.id 时,这是正常的,但是当我访问 produk.adev.co.id 时,它给出了一个错误{ {1}}
我的.htaccess
500 Internal Server Error
produk.adev.co.id日志文件
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
[编辑]
在Chmod上尝试-R后,它不起作用,并且我检查了日志文件。结果:
[Wed Aug 08 11:20:33.556023 2018] [core:error] [pid 5628] [client 127.0.0.1:53255] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://produk.adev.co.id/