mac下配置yii2 apache
当apache2的 httpd-vhosts.conf 设置的文件权限 与 .htaccess 的rewrite规则相冲突时,会报 403错误
<VirtualHost *:80> ServerName y2.com #DocumentRoot "/Library/WebServer/Documents/yii2-ace-admin/backend/web/" DocumentRoot "/Users/mrchow/Sites/yii2-ace-admin/backend/web/" # <Directory "/Library/WebServer/Documents/yii2-ace-admin/backend/web/"> <Directory "/Users/mrchow/Sites/yii2-ace-admin/backend/web/"> # 重定向规则 # use mod_rewrite for pretty URL support RewriteEngine on # If a directory or a file exists, use the request directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Otherwise forward the request to index.php RewriteRule . index.php # use index.php as index file DirectoryIndex index.php # 文件权限 Options FollowSymLinks Multiviews MultiviewsMatch Any AllowOverride None Require all granted </Directory> </VirtualHost>
。
。
相关推荐
WasteLand 2020-10-18
Allinputs 2020-08-30
Ashes 2020-06-14
caiyiii 2020-06-14
kxguan 2020-06-14
daillo 2020-06-14
一粒沙里的世界 2020-06-14
ruxingli 2020-06-14
csssy00 2020-06-14
阿佐 2020-06-14
NameWFY 2020-05-28
NameWFY 2020-05-26
Robin罗兵 2020-05-16
caiyiii 2020-04-29
wmsjlihuan 2020-04-26
cbao 2020-04-26
csssy00 2020-04-19
igogo00 2020-03-09