nginx + lua环境搭建

brew install lua



=============nginx============

  • 启动nginx服务
    sudo brew services start nginx
    利用http://localhost:8080进行访问, 如果出现如下界面,说明启动成功.
  • 查看nginx版本
    nginx -v
  • 关闭nginx服务
    sudo brew services stop nginx

另外几个比较方便的指令

  • 重新加载nginx
    nginx -s reload
  • 停止nginx
    nginx -s stop




===========openresty=============

brew install openresty/brew/openresty



➜  openresty-test git:(master) ✗ /usr/local/Cellar/openresty/1.13.6.2/nginx/sbin/nginx -c /Users/f/openresty-test/nginx.conf
➜  openresty-test git:(master) ✗ curl http://localhost:6699 -i
HTTP/1.1 200 OK
Server: openresty/1.13.6.2
Date: Mon, 28 May 2018 06:48:54 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive


HelloWorld



猜你喜欢

转载自blog.csdn.net/muyimo/article/details/80479978