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 必不可少
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 必不可少
相关文章推荐
- php对接西部数码API
- js、php、thrift的坑
- Config PHP5.6 on WIN7 IIS
- PHP获取系统时间和设置所在时区
- PHP模拟发送POST请求之四、加强file_get_contents()发送POST请求
- PHP中的抽象类与接口
- php 重启命令
- PHP中的多态
- OTP ROM MCU是什么意思
- phpMyAdmin对外开放
- 路由器TP-LINK设置花生壳域名
- yii2 pdo 应用
- 改变Yii2的默认路由
- ThinkPHP使用技巧经验总结
- php qrcode示例
- YII2设置路由访问,美化url
- phpexcel 导出数据
- 浅谈 PHP 中的多种加密技术及代码示例
- PHP学习(一)
- vsftp服务的简介与配置