安装nginx

brew install nginx

sudo nginx

测试安装

在浏览器打开下面的链接地址

http://localhost:8080

nginx.conf配置

    # HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#}
include servers/*;
}

启动nginx

sudo nginx -c /usr/local/etc/nginx/nginx.conf

重启

sudo nginx -s reload

停止

sudo nginx -s stop

查看日志

/usr/local/var/log/nginx/access.log	

/usr/local/var/log/nginx/error.log

/usr/local/Cellar/nginx/1.10.0/logs/access.log

/usr/local/Cellar/nginx/1.10.0/logs/error.log

参考

http://www.jianshu.com/p/d65ef55a8e09

http://www.xuebuyuan.com/2174288.html

使用Homebrew在Mac OS X EI Capitan上安装与配置nginx和PHP的更多相关文章

  1. 如何关闭 Mac OS X EI Capitan 系统文件保护

    在修改 Mac OS X EI Capitan 系统的某些系统文件的过程中,你可能会遇到即使你加了 sudo 以管理员身份去操作页会被拒绝, 这是一个名为 SIP(System Integrity P ...

  2. mac os x在PC上安装

    系统安装之前的准备工作及安装过程简介 前面我们已经提到,苹果电脑虽然已经采用了x86架构的Intel处理器,但其官方并不提供在非苹果电脑上安装Mac OS的支持.所以,要想在普通PC/笔记本电脑上安装 ...

  3. OS X EI Capitan 系统 安装cocoapod

    没有废话直接上步骤    (哪一步卡住了 多试几次 可能是网络不好的缘故) 1. 首先安装 home-brew   以下方法转自:http://www.cnblogs.com/lzrabbit/p/4 ...

  4. 在Mac OS X 10.9上安装 Thrift 0.9.1

    Thrift 0.9.1 官方文档中对于Mac OS X上的安装描述适合 10.8,但不适用于10.9. Homebrew  macport 默认都不能在 10.9上安装Thrift 0.9.1成功 ...

  5. Mac OS X下Maven的安装与配置

    Mac OS X 安装Maven: 下载 Maven, 并解压到某个目录.例如/Users/robbie/apache-maven-3.3.3 打开Terminal,输入以下命令,设置Maven cl ...

  6. mac os 10.10.4 上安装mysql5.6.26

    在 Mac 系统上, 安装 MySQL Server 通常是用 DMG 包在图形化界面下按提示安装, 此外 MySQL 还提供了 Compressed TAR Archive 二进制包安装方式, 即免 ...

  7. 在Mac OS X 10.9上安装nginx

    1. 安装PCRE Download latest PCRE. After download go to download directory from terminal. $ cd ~/Downlo ...

  8. 解决升级mac os X EI Capitan后遇到LibclangError: dlopen(libclang.dylib, 6): image not found.的问题

    打开文件./frameworks/cocos2d-x/tools/bindings-generator/clang/cindex.py 把第 3395 行 改为 : library = cdll.Lo ...

  9. Python-Mac OS X EI Capitan下安装Scrapy

    sudo pip install scrapy --ignore-installed six #sudo pip install scrapy --upgrade --ignore-installed ...

随机推荐

  1. 获取预制和获取gameObject

    using UnityEngine; using System.Collections; using System.Collections.Generic; using UnityEditor; pu ...

  2. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing ___Error Installing APK

    一 : 根据以下路径,找到Instant Run中的选项         File —— Settings——Build,Execution,Deployment——Instant Run       ...

  3. vue再次入手(数据传递①)

    准备 之前使用vue.js完成一个项目之后,对其还是充满着无限兴趣,于是不妨利用碎片时间再次研究一下这个“令人着迷”的js框架. 1.新建一个基于vue的项目,具体方法不再赘述,请看这里:http:/ ...

  4. codeforces水题100道 第十题 Codeforces Round #277 (Div. 2) A. Calculating Function (math)

    题目链接:www.codeforces.com/problemset/problem/486/A题意:求表达式f(n)的值.(f(n)的表述见题目)C++代码: #include <iostre ...

  5. jQuery给动态添加生成的元素绑定事件的方法

    <div id="testdiv">   <ul></ul> </div> 需要给<ul>里面动态添加的<li&g ...

  6. 【cs229-Lecture8】顺序最小优化算法

    ref:    blog:http://zhihaozhang.github.io/2014/05/20/svm4/ <数据挖掘导论> 真正的大神是当采用的算法表现出不是非常好的性能的时候 ...

  7. 剑指offer——49

    丑数 因子只含2,3,5的数称为丑数. 怎么求第K大的丑数呢.K可以为10^7 最简单的做法是,对每个数判断是否为丑数. 复杂度为O( n * log(n) ),理论上是不行的. uglys[i] 来 ...

  8. 在centos7 ubuntu15.04 上通过bosh-lite 搭建单机环境cloudfoundry

    Bosh-lite简介       bosh-lite 是一个单机部署cloudfoundry的实验性工具,用于开发人员做poc 验证.Bosh-lite目前支持仅MAC OS X和Linux系统.B ...

  9. webstorm启动报错

    环境: 在重装完系统的电脑上第一次安装webstorm, 问题: 解决”failed to load jvm dll“的报错问题: 解决方案: 安装Microsoft Visual C++ 2010 ...

  10. LeetCode 49 Group Anagrams(字符串分组)

    题目链接: https://leetcode.com/problems/anagrams/?tab=Description   Problem:给一个字符串数组,将其中的每个字符串进行分组,要求每个分 ...