openresty

创建配置文件
在 conf 目录下创建一个文本文件作为配置文件,命名为 nginx.conf,文件内容如下:
worker_processes 1; #nginx worker 数量
error_log logs/error.log; #指定错误日志文件路径
events {
worker_connections 1024;
}

http {
server {
#监听端口,若你的6699端口已经被占用,则需要修改
listen 6699;
location / {
default_type text/html;

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

}

sudo nginx -p pwd/ -c conf/nginx.conf

你可能感兴趣的:(openresty)