mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-11-09 22:20:00 +01:00
dedup artifact registry config & split ea artifacts out of /opt/socore/html/ into dedicated /opt/socore/elastic-artifacts/artifacts/
This commit is contained in:
2 files changed
+17
-36
No files matched your search
@@ -54,9 +54,9 @@ so-nginx:
|
|||||||
- /opt/so/log/nginx/:/var/log/nginx:rw
|
- /opt/so/log/nginx/:/var/log/nginx:rw
|
||||||
- /opt/so/tmp/nginx/:/var/lib/nginx:rw
|
- /opt/so/tmp/nginx/:/var/lib/nginx:rw
|
||||||
- /opt/so/tmp/nginx/:/run:rw
|
- /opt/so/tmp/nginx/:/run:rw
|
||||||
- /nsm/elastic-fleet/so_agent-installers/:/opt/socore/html/packages
|
- /nsm/elastic-fleet/artifacts/:/opt/socore/elastic-artifacts/artifacts:ro
|
||||||
- /nsm/elastic-fleet/artifacts/:/opt/socore/html/artifacts
|
|
||||||
{% if GLOBALS.is_manager %}
|
{% if GLOBALS.is_manager %}
|
||||||
|
- /nsm/elastic-fleet/so_agent-installers/:/opt/socore/html/packages
|
||||||
- /etc/pki/managerssl.crt:/etc/pki/nginx/server.crt:ro
|
- /etc/pki/managerssl.crt:/etc/pki/nginx/server.crt:ro
|
||||||
- /etc/pki/managerssl.key:/etc/pki/nginx/server.key:ro
|
- /etc/pki/managerssl.key:/etc/pki/nginx/server.key:ro
|
||||||
# ATT&CK Navigator binds
|
# ATT&CK Navigator binds
|
||||||
|
|||||||
+15
-34
@@ -4,6 +4,8 @@
|
|||||||
{%- set role = grains.id.split('_') | last %}
|
{%- set role = grains.id.split('_') | last %}
|
||||||
{%- set influxpass = salt['pillar.get']('secrets:influx_pass') %}
|
{%- set influxpass = salt['pillar.get']('secrets:influx_pass') %}
|
||||||
{%- set influxauth = ('so:' + influxpass) | base64_encode %}
|
{%- set influxauth = ('so:' + influxpass) | base64_encode %}
|
||||||
|
{%- set all_names = [GLOBALS.hostname, GLOBALS.url_base] + NGINXMERGED.ssl.alt_names %}
|
||||||
|
{%- set full_server_name = all_names | unique | join(' ') %}
|
||||||
|
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
error_log /var/log/nginx/error.log;
|
error_log /var/log/nginx/error.log;
|
||||||
@@ -39,52 +41,31 @@ http {
|
|||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
|
||||||
{%- if role in ['fleet'] %}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 8443;
|
|
||||||
server_name {{ GLOBALS.hostname }};
|
|
||||||
root /opt/socore/html;
|
|
||||||
location /artifacts/ {
|
|
||||||
try_files $uri =206;
|
|
||||||
proxy_read_timeout 90;
|
|
||||||
proxy_connect_timeout 90;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header Proxy "";
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
{%- if GLOBALS.is_manager %}
|
{%- if GLOBALS.is_manager %}
|
||||||
{%- set all_names = [GLOBALS.hostname, GLOBALS.url_base] + NGINXMERGED.ssl.alt_names %}
|
|
||||||
{%- set full_server_name = all_names | unique | join(' ') %}
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
server_name _;
|
server_name _;
|
||||||
return 307 https://{{ GLOBALS.url_base }}$request_uri;
|
return 307 https://{{ GLOBALS.url_base }}$request_uri;
|
||||||
}
|
}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if GLOBALS.is_manager or role == 'fleet' %}
|
||||||
server {
|
server {
|
||||||
listen 8443;
|
listen 8443;
|
||||||
|
{%- if GLOBALS.is_manager %}
|
||||||
server_name {{ full_server_name }};
|
server_name {{ full_server_name }};
|
||||||
root /opt/socore/html;
|
{%- else %}
|
||||||
|
server_name {{ GLOBALS.hostname }};
|
||||||
|
{%- endif %}
|
||||||
|
root /opt/socore/elastic-artifacts;
|
||||||
location /artifacts/ {
|
location /artifacts/ {
|
||||||
try_files $uri =206;
|
try_files $uri =404;
|
||||||
proxy_read_timeout 90;
|
}
|
||||||
proxy_connect_timeout 90;
|
location / {
|
||||||
proxy_set_header Host $host;
|
return 404;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header Proxy "";
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if GLOBALS.is_manager %}
|
||||||
server {
|
server {
|
||||||
listen 443 ssl default_server;
|
listen 443 ssl default_server;
|
||||||
http2 on;
|
http2 on;
|
||||||
|
|||||||
Reference in new issue
Block a user