使用Homebrew在Mac OS X EI Capitan上安装与配置nginx和PHP
2016-05-18 13:50
1001 查看
安装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/d65ef55a8e09http://www.xuebuyuan.com/2174288.html
相关文章推荐
- nginx location匹配
- Linux配置nginx流媒体节点服务器过程
- nginx服务器安装及配置文件详解
- Nginx报错 13: Permission denied
- 线上服务器nginx日志无切割引起的祸
- nginx变量使用方法详解(4)
- Nginx做网站缓存
- nginx 直接在配置文章中设置日志分割
- nginx 负载均衡,session粘贴
- nginx变量使用方法详解(3)
- 安装nginx
- FastDFS+Nginx轻量级分布式文件系统安装使用
- 搭建FastDFS分布式存储环境(使用Nginx模块)
- nginx pathinfo配置,适用于较高版本的nginx
- KVM虚拟化搭建nginx负载均衡 和lamp 架构(一 kvm安装)
- nginx:403 forbidden 二种原因
- nginx:虚拟主机配置
- 修改或隐藏Nginx的版本号
- Web服务器Nginx多方位优化策略
- Nginx配置文件nginx.conf中文详解