root@wsy-message4 sbin]# ./nginx -V
nginx version: nginx/1.18.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/etc/nginx --sbin-path=/usr/etc/nginx/sbin/nginx--error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --user=wssuser --group=wssuser --with-http_ssl_module --with-threads --with-http_realip_module --with-http_gzip_static_module --http-proxy-temp-path=/var/tmp/nginx/proxy/ --with-http_stub_status_module --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --add-module=../nginx_upstream_check_module-master --with-pcre --with-stream
[root@wsy-message4 sbin]# nginx -t
nginx: [emerg] "stream" directive is not allowed here in /usr/etc/nginx/conf/conf.d/ab_pay_gateway.conf:26
nginx: configuration file /usr/etc/nginx/conf/nginx.conf test failed
配置文件格式:
stream{
upstream rabbitTcp{
server 172.16.15.17:5672;
server 172.16.15.18:5672;
}
server {
listen 8080;
location /rbweb/{
proxy_pass rabbitTcp;
}
}
}