Error: nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf:11
Gandla, Kesavardhana
kesavardhana.gandla at medtronic.com
Thu Dec 7 09:17:37 UTC 2023
Dear NGINX community,
I am Kesavardhana Gandla from Medtronic R&D, Bangalore. I am trying to evaluate the nginx on YOCTO Linux based embedded product.
My Linux version: 5.15.71 aarch64 GNU/Linux.
While using the stream option on target the below error is coming.
Error: nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf:11
Attached the nginx.conf file for reference.
nginx -V
nginx version: nginx/1.20.1
built with OpenSSL 3.0.7 1 Nov 2022
TLS SNI support enabled
configure arguments: --crossbuild=Linux:aarch64 --with-endian=little --with-int=4 --with-long=8 --with-long-long=8 --with-ptr-size=8 --with-sig-atomic-t=8 --with-size-t=8 --with-off-t=8 --with-time-t=8 --with-sys-nerr=132 --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/run/nginx/client_body_temp --http-proxy-temp-path=/run/nginx/proxy_temp --http-fastcgi-temp-path=/run/nginx/fastcgi_temp --http-uwsgi-temp-path=/run/nginx/uwsgi_temp --http-scgi-temp-path=/run/nginx/scgi_temp --pid-path=/run/nginx/nginx.pid --prefix=/usr --with-threads --with-http_gzip_static_module --with-http_ssl_module
Could you please provide your feedback to resolve the above error "unknown directive stream"?
Does open source version of NGNX support stream directive? If yes, how to include it in the yocto build?
Thanks,
Kesavardhana Gandla
[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records. To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20231207/1dbea996/attachment-0001.htm>
-------------- next part --------------
user www;
worker_processes 1;
pid /run/nginx/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
stream {
server {
listen 8081;
# proxy_pass IP_ADDRESS:PORT_NUMBER;
}
}
http {
# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# SSL Settings
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
## Logging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
## Gzip settings
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
## Virtual Host Configs
## Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
More information about the nginx
mailing list