nginx and OpenResty

| 分类 utilities  | 标签 nginx  openresty 

Nginx 与 OpenResty 的关系

Nginx Commands

## following commands takes effect in Apple Silicon machine.

# installation
$ brew install nginx
# test if the config file is correct
$ nginx -t
# check nginx version and config file location
$ nginx -V
# reload config and not stop nginx
$ nginx -s reload

  • configuration location: /opt/homebrew/etc/nginx

OpenResty

相关命令

# 检查 openresty 服务状态
$ sudo systemctl status openresty
# 检查 openresty 配置是否正确
$ sudo openresty -t
# 查看 openresty 详细配置
$ sudo journalctl -u openresty -e

主要目录

路径 说明
/usr/local/openresty/ 安装根目录
/usr/local/openresty/nginx/sbin/nginx 实际的 nginx 可执行文件
/usr/bin/openresty 软链接,指向上面的 nginx 可执行文件(推荐用这个命令)
/usr/local/openresty/nginx/conf/nginx.conf 默认配置文件
/usr/local/openresty/nginx/logs/ 日志目录(access.log、error.log)
/usr/local/openresty/luajit/ 自带的 LuaJIT
/usr/local/openresty/lualib/ Lua 库目录

上一篇     下一篇