openresty nginx,启动nginx后没有工作进程

我在windows 10上使用内置的bash for ubantu

我安装了openresty,并使用命令“nginx -p openresty-test”启动了它的nginx。

我的nginx.conf内容为:

worker_processes  2;
error_log logs/error.log;
events {
    worker_connections 1024;
}

http {
    server {
        listen 6699;
        location / {
            default_type text/html;

            content_by_lua_block {
                ngx.say("HelloWorld")
            }
        }
    }
}

问题: 我尝试使用curl " http://localhost:6699 -i",它被阻止了,没有任何消息返回。 我使用web浏览器访问localhost:6699,也被阻止了。

我运行“ps -ef | grep nginx”显示:
27     1  0  2433 ?        00:00:00 nginx: master process ng
29     2  0  2433 ?        00:00:00 grep --color=auto nginx

如我们所见,只有一个master进程,没有任何工作进程,我怀疑这引起了我的问题。

我该怎么办?

点赞