• GitHubGanKai
    2019-10-09
    真好,又见到你了,而且我最近换个了mac,😊正愁这个。

    作者回复: we meet again.

    
     4
  • dongge
    2019-10-18
    老师好,
    按文章指导搭建了MAC的环境:
    openresty -v
    nginx version: openresty/1.11.2.2

    在~/git/http_study/www目录下执行
     ./run.sh start
    Password:
    nginx: [emerg] "/Users/xiaodong/git/http_study/www/conf/ssl/ticket.key" must be 48 bytes in /Users/xiaodong/git/http_study/www/conf/nginx.conf:34
    报了这个错误,在网上google没找到解决方法。
    尝试在nginx.conf中注销相关代码,也会报其他错误。
    老师能指点一下吗?
    展开

    作者回复: 这是提示Nginx要求48字节的密钥文件,按理说附带的80字节也是可以的,你可以用命令“openssl rand 48 > ticket.key”重新生成www/conf/ssl/ticket.key。

    详细可参见http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets

    另外,你用的openresty版本太老了,用最新的1.15.8.2可能就不会出现这样的问题。

     1
     1
  • 极客时间
    2020-01-06
    最喜欢实验环境了,之前学习就是苦于没实验环境浪费了几年时间。

    作者回复: 搭好后一定要多做实验,实践出真知。

    
    
  • 无名
    2019-11-15
    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 1 tap (homebrew/core).
    ==> Updated Formulae
    handbrake

    ==> Installing openresty from openresty/brew
    ==> Downloading https://openresty.org/download/openresty-1.15.8.2.tar.gz
    Already downloaded: /Users/hejunbin/Library/Caches/Homebrew/downloads/4395089f0fd423261d4f1124b7beb0f69e1121e59d399e89eaa6e25b641333bc--openresty-1.15.8.2.tar.gz
    ==> ./configure -j8 --prefix=/usr/local/Cellar/openresty/1.15.8.2 --pid-path=/us
    Last 15 lines from /Users/hejunbin/Library/Logs/Homebrew/openresty/01.configure:
    DYNASM host/buildvm_arch.h
    HOSTCC host/buildvm.o
    HOSTLINK host/buildvm
    BUILDVM lj_vm.S
    BUILDVM lj_ffdef.h
    BUILDVM lj_bcdef.h
    BUILDVM lj_folddef.h
    BUILDVM lj_recdef.h
    BUILDVM lj_libdef.h
    BUILDVM jit/vmdef.lua
    make[1]: *** [lj_folddef.h] Segmentation fault: 11
    make[1]: *** Deleting file `lj_folddef.h'
    make[1]: *** Waiting for unfinished jobs....
    make: *** [default] Error 2
    ERROR: failed to run command: gmake -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/luajit

    If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
      https://github.com/openresty/homebrew-brew/issues

    These open issues may also help:
    Can't install openresty on macOS 10.15 https://github.com/openresty/homebrew-brew/issues/10
    Fails to install OpenResty https://github.com/openresty/homebrew-brew/issues/5
    The openresty-debug package should use openresty-openssl-debug instead https://github.com/openresty/homebrew-brew/issues/3

    macOS 10.15.1 安装失败。参考给出的链接也没有解决问题,求老师解惑。
    展开

    作者回复: 10.15是新出的,我没升级,看这些信息像是openresty在这上面安装有问题(luajit编译失败),可以向官方反应一下,只能期待官方更新包了。

     1
    
  • SmNiuhe
    2019-11-07
    这个大家有遇到嘛,是不是资源的问题
    brew install openresty/brew/openresty :DownloadError: Failed to download resource "openresty-openssl--patch"
    Download failed: https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-1.1.0d-sess_set_get_cb_yield.patch

    作者回复: 如果mac安装有问题,可以用virtualbox装个Linux虚拟机,暂解燃眉之急。

     1
    
  • Dream.
    2019-10-17
    Linux-CentOS 7下,修改了/etc/hosts的域名与IP的映射关系后

    再使用./run.sh start启动OpenResty之后

    curl localhost 或者 curl http://www.chrono.com都是返回403

    按之前课程里的url访问https://www.chrono.com/11-1什么的,都返回404

    第一次接触OpenResty,麻烦老师回复下是哪里没配置好嘛?
    展开

    作者回复: 我这里没有遇到你这样的现象。

    先用run.sh list看看Nginx进程是否正常运行,然后用netstat等工具检查一下监听端口,是否有防火墙什么的其他应用阻碍了服务。

    可以问问周围熟悉Linux运维的同事。

     1
    
  • dongge
    2019-10-16
    这个专栏这么好玩,留言的人这么少,真可惜。

    作者回复: 答疑篇来的太晚了,没赶上当初的热度,不过总会有需要的同学看到的。

    
    
  • 许童童
    2019-10-13
    老师又来了,很高兴再次见到老师。

    作者回复: nice to meet you again.

    
    
  • 果果
    2019-10-09
    当初费了好些时间,才在mac上搭建了环境

    作者回复: 这篇答疑来晚了,实在是抱歉。

    
    
我们在线,来聊聊吧