安装的是 oneinstack,
在 nginx.conf 插入 stream 代码的时候报错,
显示的是nginx: [emerg] "stream" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:86
stream {
    map $ssl_preread_server_name $backend_name {
        test.domain.net trojan;
        test1.domain.net web;
        test2.domain.net web;
    }
    upstream trojan {
        server 127.0.0.1:50443;
    }
    upstream web {
        server 127.0.0.1:445;
    }
    server {
        listen 443 reuseport;
        listen [::]:443 reuseport;
        proxy_pass  $backend_name;
        ssl_preread on;
    }
}
网上普遍反应是没有安装模块,但似乎是装了的哈
nginx version: nginx/1.22.1
built by gcc 8.3.0 (Debian 8.3.0-6)
built with OpenSSL 1.1.1s  1 Nov 2022
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_ssl_module --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-1.1.1s --with-pcre=../pcre-8.45 --with-pcre-jit --with-ld-opt=-ljemalloc
感谢
|      1julyclyde      2022-12-21 11:20:48 +08:00  1 你的 stream 是不是放到 http 内了? | 
|  |      2msg7086      2022-12-21 11:52:31 +08:00  1 stream 段插错地方了。 | 
|  |      3zhoudaiyu PRO  1 stream 是在根这一层的,和什么 http 、events 是一个层级的,检查下配置文件吧 |