apache2.4/php设置项目访问目录/项目虚拟路径

网上很多答案都是过时的,根本不是2.4版本的正确配置,看过官方更新文档后

 

 

正确配置:


#配置虚拟目录
<IfModule dir_module>
# directory 相当于是欢迎页面
DirectoryIndex index.html index.html index.php
#你的站点别名
Alias /web  "F:/phpworkspace"
<Directory  "F:/phpworkspace">
#这是访问权限设置----
Require all granted
</Directory>
</IfModule>

 

访问:http://127.0.0.1/web/......(你的项目)

posted @ 2020-08-30 21:52  海底的船  阅读(410)  评论(0编辑  收藏  举报