Mac apache You don't have permission to access / on this server.
在mac下配置完apache和php环境后,通过localhost访问页面,出现403Forbidden。页面提示:
Forbidden
You don't have permission to access / on this server.
解决办法是修改/etc/apache/httpd.conf的配置
1、打开终端
2、cd /etc/apache2 --切换到apache目录
3、sudo vim httpd.conf --需要输入电脑密码
如果apache版本是2.2的话,应该这么写
<Directory "/Users/apple/Sites/">
--/Users/apple/Sites是自己设置的apache指向的站点目录,默认是/Library/WebServer/Document
Options Indexes MultiViews
AllowOverride All # OSX 10.9 / Apache 2.2
Order from deny, allow
</Directory>
如果apache版本是2.4的话,应该这么写
<Directory "/Users/apple/Sites/">--/Users/apple/Sites是自己设置的apache指向的站点目录,默认是/Library/WebServer/Document
Options Indexes MultiViews
AllowOverride All
# OSX 10.10 / Apache 2.4
Require all granted
</Directory>
Mac apache You don't have permission to access / on this server.的更多相关文章
- (转) 问题解决:Apache: You don't have permission to access / on this server
问题解决:Apache: You don't have permission to access / on this server 转自:http://blog.csdn.net/crazyboy20 ...
- Apache: You don't have permission to access / on this server
当我们需要使用Apache配置虚拟主机时,有可能会出现这个问题:Apache: You don't have permission to access / on this server # 同IP不同 ...
- 问题解决:Apache: You don't have permission to access / on this server
虚拟主机(Virtual Host)是指在一个机器上运行多个网络站点 (比如:www.company1.com和www.company2.com). 如果每个网络站点拥有不同的IP地址,则虚拟主机可以 ...
- apache You don't have permission to access / on this server.无权访问
环境:ubuntu16.4 apache2 原因:修改了apache web项目路径 解决: 1. 修改 /etc/apache2/sites-available/000-default.conf 文 ...
- Mac OS X中配置Apache后提示You don't have permission to access / on this server
根据这篇博客http://www.cnblogs.com/snandy/archive/2012/11/13/2765381.html,在mac系统中,配置的apache,配置完成后,提示 You d ...
- mac osx下apache下的坑: you don’t have permission to access / on this server
在Mac下Apache修改默认站点的目录时,遇到403错误, you don’t have permission to access / on this server 首先按照google到教程: 修 ...
- WampServer phpadmin apache You don't have permission to access
1.Forbidden You don't have permission to access / on this server. 后来咨询了一下朋友(php高手),说修改一下php的配置文件http ...
- Apache提示You don't have permission to access / on this server问题解决
测试时遇到将一本地目录设置为一apache的虚拟主机,在httpd-vhosts.conf文件中进行简单设置,然后在hosts文件中将访问地址指向本地,启动apache,进行访问,却出现了You do ...
- apache出现You don’t have permission to access / on this server问题的解决
今天在部署一个系统时,在apache中新开了一个VirtualHost,然后设置了DocumentRoot,等访问时却提示“You don’t have permission to access / ...
随机推荐
- Educational Codeforces Round 60 (Rated for Div. 2) D. Magic Gems(矩阵快速幂)
题目传送门 题意: 一个魔法水晶可以分裂成m个水晶,求放满n个水晶的方案数(mol1e9+7) 思路: 线性dp,dp[i]=dp[i]+dp[i-m]; 由于n到1e18,所以要用到矩阵快速幂优化 ...
- vue 一个轮播的组件
当我们进行开发的时候,并不是说所有信息都会在写一个组件中 作为项目的老大,我们要去思考每个文件下面需要放什么业务,分的越细.越合理为好 我们在componts文件下新建一个Banner.vue 组件 ...
- Hibernate快速入门之CRUD
一.Hibernate的基本概念 前言 Hibernate是一个ORM框架,ORM是Object Relational Mapping的缩写,即对象关系映射,也就是将面向对象思想的编程语言与关系型数据 ...
- 一些关于C#发送邮件的代码
1.命名空间 using System.Net.Mail; 2.创建一个MailMessage类的对象 MailMessage mail = new MailMessage(); MailMessag ...
- linux中的一些常用命令
shutdown -h now 现在马上关机 shutdown -r now 现在重新启动 reboot 现在重新启动 su - 如果当前是普通用户,则输入这条命令切换到管理员用户(root),如果要 ...
- 【记录】解决windows中nginx明明退出了,为什么还能反向代理?CMD强制杀死进程命令
博主今天遇到一个很奇怪的问题,nginx在windows中明明已经退出了,而且在任务管理器中也没发现nginx进程, 为什么还能反向代理呢? 找了半天资料终于解决,现记录如下,希望能帮助到你. 步骤一 ...
- vue报错TypeError: Cannot read property 'protocol' of undefined
错误信息如下所示: isURLSameOrigin.js?3934:57 Uncaught (in promise) TypeError: Cannot read property 'protocol ...
- Airbnb JavaScript 编码风格指南(2018年最新版)
原网址 : https://segmentfault.com/a/1190000013040555 类型 基本类型:直接存取 string number boolean null undefined ...
- 随笔4 Dictionary<K,V>
本来说是想介绍一下Hashtable的,但是发现HashMap和Hashtable最开始的不同就是在于HashMap继承了AbstractMap,而Hashtable继承了Dictionary< ...
- springboot通过继承OncePerRequestFilter,在拦截器中@Autowired 为null问题
springboot2版本以上环境 通过继承OncePerRequestFilter类,在重写doFilterInternal方法实现拦截的具体业务逻辑, 在实现的过程中,需要注入service方法, ...