phpstudy安装过程遇到的错误

论坛 期权论坛 脚本     
已经匿名di用户   2022-4-20 22:06   3189   0
问题描述:phpstudy运行环境。apache和mysql都可以正常启动,但打开页面出现403,You don't have permission to access / on this server.


纠错:1.
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>
修改成
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
# Deny from all
Allow from all
#允许所有访问
Satisfy all
</Directory>




但我的是没错的,我有找了好久,终于发现,原来是我的/www文件夹下没有 index.html!!!文件。
2. 确保根目录文件下有index.html文件(或名为index而后缀为其他形式(如.jsp .php等)的文件) ,因为Apache默认以index.html为网站首页,如果没有这个文件就会出现上面的403错误。


注:如果你想以其他形式的文件(如:index.jsp或index.php等)作为出现的网页,可将Apache的配置文件中的:


<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
改为(如你想用index.jsp):


<IfModule dir_module>
DirectoryIndex index.html index.jsp
</IfModule>


如果需要浏览该文件夹下的内容,可以在</Directory>前添加:


Options Indexes


就可以了。
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:81
帖子:4969
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP