Mac Os自带Apache修改自定义项目配置报403 Forbidden, You don't have permission to access/on this server解决
来源:互联网 发布:洛阳市青峰网络 编辑:程序博客网 时间:2024/06/06 01:36
Mac OS X 系统已经集成了 Apache+PHP 环境,依次进入“系统偏好设置 -> 共享” ,开启“Web 共享”,就可以打开 Apache。
但新版的 Mac OS X 中,苹果取消了这个共享功能的图形界面,只能从命令行开启。
在终端里输入命令,启动 Apache: sudo apachectl start
关闭 Apache: sudo apachectl stop
重启 Apache:sudo apachectl restart
查看 Apache 版本:httpd -v
Mac OS X 10.9.X 中的 Apache 版本信息:
Server version: Apache/2.2.26 (Unix) Server built: Dec 10 2013 22:09:38
启用 Apache 之后,在浏览器中访问 http://localhost 或 http://127.0.0.1,如果出现“It works!”就表示运行正常。
以上内容来自http://jingyan.baidu.com/article/0aa22375b553a488cc0d64b5.html ,
不过我在修改/etc/apache2/httpd.conf配置,将默认的项目路径由 /Library/WebServer/Documents/ 都替换成自己的路径,比如 /Users/juliana/myphpspace
重启apache后,报403 Forbidden,You don't have permission to access/on this server ,解决方案:
1).将#<Directory />
# AllowOverride none
# Require all denied
#</Directory>改为:<Directory />
Options Indexes FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>2).将AllowOverride None改为AllowOverride All
DocumentRoot "/Users/juliana/newsp/testing/Test/www"
<Directory "/Users/juliana/newsp/testing/Test/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options FollowSymLinks Multiviews
MultiviewsMatch Any
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
# AllowOverride None
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>然后重启apache服务器,就正常了!
- Mac Os自带Apache修改自定义项目配置报403 Forbidden, You don't have permission to access/on this server解决
- Apache配置问题Forbidden You don't have permission to access / on this server
- Apache配置问题Forbidden You don't have permission to access / on this server
- apache 2.49配置虚拟主机Forbidden You don't have permission to access / on this server
- Apache 403 Forbidden:You don't have permission to access / on this server.
- 解决 403 Forbidden You don't have permission to access / on this server
- 解决mac os You don't have permission to access / on this server.
- 在Mac OS X 10.10.2中配置Apache (You don t have permission to access / on this server)
- 局域网访问Apache PHP错误:Forbidden You don't have permission to access / on this server.
- Apache Forbidden:You don't have permission to access / on this server.
- You don\'t have permission to access /test.php on this server.怎样解决Forbidden
- Wamp下的虚拟主机报错403 Forbidden, You don't have permission to access / on this server.
- MAMP "403 Forbidden You don't have permission to access / on this server."
- 403 Forbidden You don't have permission to access / on this server.
- mac os You don't have permission to access / on this server.
- apache报错You don't have permission to access /test/index.php on this server.
- apache 提示You don't have permission to access /test.php on this server.怎样解决
- apache 提示You don't have permission to access /test.php on this server.怎样解决
- 要嫁就嫁程序猿——钱多话少死的早
- 剑指offer:(17)代码的鲁棒性:合并两个排序的链表
- HttpClient4.4.1模拟登录知乎
- 关于mybatis中llike模糊查询中#和$的使用
- Uva524—素数环
- Mac Os自带Apache修改自定义项目配置报403 Forbidden, You don't have permission to access/on this server解决
- EVUS登记系统
- List,Set,Map用法详解
- android 插件加载机制之一
- Python学习笔记--3
- Mybatis的一次简单查询过程
- C语言例题*2
- matlab带UI界面编译成可执行文件问题汇总
- 指针数组和数组指针