【问题标题】:Openresty: how to use a different nginx.conf?Openresty:如何使用不同的 nginx.conf?
【发布时间】:2021-11-08 22:57:07
【问题描述】:

在 Ubuntu 20.04 中: 我安装了 openresty 并且运行良好。 它使用默认的/usr/local/openresty/nginx/conf/nginx.conf

我想在~/conf/nginx.conf 中使用新的自定义nginx.conf 文件。

如何让 openresty 在这个新的 conf 文件上运行?

【问题讨论】:

    标签: nginx openresty


    【解决方案1】:

    刚刚找到答案:

    ubuntu@john:~$ openresty -help
    nginx version: openresty/1.19.9.1
    Usage: nginx [-?hvVtTq] [-s signal] [-p prefix]
                 [-e filename] [-c filename] [-g directives]
    
    Options:
      -?,-h         : this help
      -v            : show version and exit
      -V            : show version and configure options then exit
      -t            : test configuration and exit
      -T            : test configuration, dump it and exit
      -q            : suppress non-error messages during configuration testing
      -s signal     : send signal to a master process: stop, quit, reopen, reload
      -p prefix     : set prefix path (default: /usr/local/openresty/nginx/)
      -e filename   : set error log file (default: logs/error.log)
      -c filename   : set configuration file (default: conf/nginx.conf)
      -g directives : set global directives out of configuration file
    
    

    使用

    openresty -c filename
    

    【讨论】:

      猜你喜欢
      • 2021-08-08
      • 2013-12-23
      • 2013-12-06
      • 2013-11-26
      • 2020-12-20
      • 2023-04-02
      • 1970-01-01
      • 2021-03-21
      • 1970-01-01
      相关资源
      最近更新 更多