开启vhost 文件 命令行输入

vim /etc/apache2/httpd.conf

找到把前边的#  

include /private/etc/apache2/extra/httpd-vhost.conf

开启改写模块

找到下一行命令

LoadModule rewrite_module modules/mod_rewrite.so

把前边的#去掉

打开配置httpd-vhost.conf

sudo vim /etc/apache2/extra/httpd-vhosts.conf

  添加配置信息

<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/shop"
ServerName dragon.cn
ErrorLog "/private/var/log/apache2/dummy-dragon.cn-error_log"
CustomLog "/private/var/log/apache2/dummy-dragon.cn-access_log" common <Directory />
options none
AllowOverride none
Require all granted
</Directory>
</VirtualHost>

  

然后修改  

Options none

 AllowOverride noe

  

Options FollowSymLinks

    AllowOverride All

  

最后 配置php.ini

 sudo cp /etc/php.ini.default /etc/php.ini

  配置一些php需要的扩展即可

mac apache 2.4的配置的更多相关文章

  1. os mac apache+php+mysql环境配置

    1.启用系统自带的apache 服务 打开终端(terminal) #sudo apachectl start #sudo vi /etc/apache2/httpd.conf 修改 LoadModu ...

  2. phpMyAdmin在Mac OS X上的配置和使用

    本文主要记录phpMyAdmin在Mac OS X上的配置和使用,避免朋友们走弯路,浪费不必要的时间.   1. 下载:    2. 在"设置"中打开" web shar ...

  3. Apache反向代理的配置

    Apache反向代理的配置 一: Mac系统自带apache服务器 1. 查看apache版本命令如下:   sudo apachectl -v 2. 启动apache   sudo apachect ...

  4. Mac下Maven安装与配置

    Mac下Maven安装与配置 下载maven http://maven.apache.org/download.cgi main->download菜单下的Files 下载后解压在Documen ...

  5. Mac apache You don't have permission to access / on this server.

    在mac下配置完apache和php环境后,通过localhost访问页面,出现403Forbidden.页面提示: Forbidden You don't have permission to ac ...

  6. centos7 apache httpd安装和配置django项目

    一.安装httpd服务 apache在centos7中是Apache HTTP server.如下对httpd的解释就是Apache HTTP Server.所以想安装apache其实是要安装http ...

  7. Linux下apache+phppgadmin+postgresql安装配置

    Linux下apache+phppgadmin+postgresql安装配置 操作系统:CentOS 安装包:httpd(首选yum), php(包括php以及php-pgsql,php-mbstri ...

  8. apache 虚拟主机详细配置:http.conf配置详解

    apache 虚拟主机详细配置:http.conf配置详解 Apache的配置文件http.conf参数含义详解 Apache的配置由httpd.conf文件配置,因此下面的配置指令都是在httpd. ...

  9. Apache下开启SSI配置使html支持include包含

    写页面的同学通常会遇到这样的烦恼,就是页面上的 html 标签越来越多的时候,寻找指定的部分就会很困难,那么能不能像 javascript 一样写在不同的文件中引入呢?答案是有的,apache 能做到 ...

随机推荐

  1. 编译安装PHP7并安装Redis扩展Swoole扩展

    编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...

  2. Func

    Func<List<int>, string> getStr = (list) => { var returnStr = ""; if (list.A ...

  3. CF Round #367 C题

    题目 链接:http://codeforces.com/contest/706/problem/C 好像又是DP... dp[i][0]表示第i个字符串不翻转成字典序排列的花费,dp[i][1]表示第 ...

  4. Intent

    1.http://blog.csdn.net/daogepiqian/article/details/50606474 2.http://blog.csdn.net/wulianghuan/artic ...

  5. cin的使用问题

    #cin的使用问题 cin输入类型不匹配的情况: #include<iostream> using namespace std; void main() { int i = 0; whil ...

  6. Python3.5在Windows 7下连接ORACLE数据库

    1.首先需要安装好oracle数据库,本机适用plsql连接数据库正常,记录下数据库名称 2.安装cx_oracle模块 pip install cx_Oracle 3.python中引入模块 imp ...

  7. Sql Server本地高版本备份数据备份至远程低版本数据库方法

    想要将Sqlserver高版本备份的数据还原到低版本SqlServer2008R2上去,但是这在SqlServer中是没法直接还原数据库的,通过以下方法可以顺利还原. 通过高版本生成sql脚本在低版本 ...

  8. C+继承

    // 继承.cpp : Defines the entry point for the console application.// #include "stdafx.h" str ...

  9. POI完美解析Excel数据到对象集合中(可用于将EXCEL数据导入到数据库)

    实现思路: 1.获取WorkBook对象,在这里使用WorkbookFactory.create(is); // 这种方式解析Excel.2003/2007/2010都没问题: 2.对行数据进行解析 ...

  10. js数组的sort排序详解

    <body> <div> sort()对数组排序,不开辟新的内存,对原有数组元素进行调换 </div> <div id="showBox" ...