Mac OSX上安装Nginx
2017-01-06 10:02
387 查看
1. 通过brew instal nginx安装
==> Downloading https://homebrew.bintray.com/bottles/nginx-1.10.1.el_capitan.bot ######################################################################## 100.0%
==> Pouring nginx-1.10.1.el_capitan.bottle.tar.gz
==> Caveats
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
nginx will load all files in /usr/local/etc/nginx/servers/.
To have launchd start nginx now and restart at login:
brew services start nginx
Or, if you don't want/need a background service you can just run:
nginx
==> Summary
🍺 /usr/local/Cellar/nginx/1.10.1: 7 files, 972.2K
/usr/local/bin/nginx
2. Nginx配置文件格式
https://www.digitalocean.com/community/tutorials/understanding-the-nginx-configuration-file-structure-and-configuration-contexts
File not found解决办法
http://www.jbxue.com/article/8785.html
不配置error_log就不会打印日志。
==> Downloading https://homebrew.bintray.com/bottles/nginx-1.10.1.el_capitan.bot ######################################################################## 100.0%
==> Pouring nginx-1.10.1.el_capitan.bottle.tar.gz
==> Caveats
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
nginx will load all files in /usr/local/etc/nginx/servers/.
To have launchd start nginx now and restart at login:
brew services start nginx
Or, if you don't want/need a background service you can just run:
nginx
==> Summary
🍺 /usr/local/Cellar/nginx/1.10.1: 7 files, 972.2K
/usr/local/bin/nginx
2. Nginx配置文件格式
https://www.digitalocean.com/community/tutorials/understanding-the-nginx-configuration-file-structure-and-configuration-contexts
File not found解决办法
http://www.jbxue.com/article/8785.html
不配置error_log就不会打印日志。
相关文章推荐
- Mac OS X 10.9.3上安装配置nginx-1.7.2
- 使用Homebrew在Mac OS X EI Capitan上安装与配置nginx和PHP
- 服务器-Nginx-Mac OS X 下编译安装 Nginx
- MAC OS X 10.9 下 Nginx的安装笔记(为后续搞Nginx+Redis+Tomcat集群做准备)
- Mac OS Lion 下编译安装Nginx 1.0.12 + PHP 5.3.10 + Mysql 5.5.18 + Xdebug + PHPUnit
- Mac OS Nginx的安装、启动和停止
- Mac OS X安装Nginx
- Mac OS X 安装 Nginx
- Mac OS X Mavericks or Yosemite 安装Nginx、PHP、Mysql、phpMyAdmin
- 在Mac OS X 10.9上安装nginx
- Mac OS X Mavericks or Yosemite 安装Nginx、PHP、Mysql、phpMyAdmin
- Mac OS X系统安装Nginx
- Mac OS X 安装 Nginx
- Mac OS X 下编译安装 Nginx
- Mac OS X Mavericks or Yosemite 安装Nginx、PHP、Mysql、phpMyAdmin
- 在mac os x 10.9.2上安装nginx
- Mac OS X 下编译安装 Nginx
- 在mac os x 10.9.2上安装nginx
- Mac OS Nginx的安装、启动和停止
- [原]MacOSX x86 安装百科