您的位置:首页 > 编程语言 > PHP开发

ubuntu下不加index.php无法正常访问

2015-11-03 18:43 716 查看
在一次项目中将项目迁移到Ubuntu下发现,如下链接无法正常访问
http://127.0.0.21/Home/Public/login
开启了rewrite也不行,后来经各方找资料解决

<VirtualHost 127.0.0.21:80>

DocumentRoot "/var/www/test/"

ServerName 127.0.0.21

<Directory "/var/www/test/">

Options FollowSymLinks IncludesNOEXEC Indexes

DirectoryIndex indendex.hx.html index.htm defa default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml AllowOverride Options FileInfo

AllowOverride All

Order Deny,Allow

Allow from all

</Directory>

</VirtualHost>

其中 AllowOverride All 必不可少
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: