mirror of
https://github.com/wazuh/wazuh-docker.git
synced 2025-10-23 04:51:57 +00:00
68 lines
1.4 KiB
Nginx Configuration File
68 lines
1.4 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes 1;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
server_tokens off;
|
|
gzip on;
|
|
|
|
# kibana UI
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
return 301 https://$host:443$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 default_server ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
ssl_certificate /etc/nginx/ssl/cert.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/key.pem;
|
|
location / {
|
|
proxy_pass https://kibana:5601/;
|
|
proxy_ssl_verify off;
|
|
proxy_buffer_size 128k;
|
|
proxy_buffers 4 256k;
|
|
proxy_busy_buffers_size 256k;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# load balancer for Wazuh cluster
|
|
stream {
|
|
upstream mycluster {
|
|
hash $remote_addr consistent;
|
|
server wazuh-master:1514;
|
|
server wazuh-worker:1514;
|
|
}
|
|
server {
|
|
listen 1514;
|
|
proxy_pass mycluster;
|
|
}
|
|
}
|