Skip to content

Instantly share code, notes, and snippets.

@binarytrails
Last active February 10, 2021 23:43
Show Gist options
  • Save binarytrails/9344965b9f654d7751046faaa12e6ed1 to your computer and use it in GitHub Desktop.
Save binarytrails/9344965b9f654d7751046faaa12e6ed1 to your computer and use it in GitHub Desktop.
selks6.conf
# https://github.com/StamusNetworks/SELKS/wiki/Kibana-did-not-load-properly
# replace '/etc/nginx/sites-available/selks6.conf'
server {
listen 127.0.0.1:80;
listen 127.0.1.1:80;
listen 443 default_server ssl;
ssl_certificate /etc/nginx/ssl/scirius.crt;
ssl_certificate_key /etc/nginx/ssl/scirius.key;
server_name SELKS;
access_log /var/log/nginx/scirius.access.log;
error_log /var/log/nginx/scirius.error.log;
# https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-production
location /static/ { # STATIC_URL
alias /var/lib/scirius/static/; # STATIC_ROOT
expires 30d;
}
location /media/ { # MEDIA_URL
alias /var/lib/scirius/static/; # MEDIA_ROOT
expires 30d;
}
location /app/moloch/ {
proxy_pass https://127.0.0.1:8005;
proxy_redirect off;
}
location /plugins/ {
proxy_pass http://127.0.0.1:5601/plugins/;
proxy_redirect off;
}
location /dlls/ {
proxy_pass http://127.0.0.1:5601/dlls/;
proxy_redirect off;
}
location /socket.io/ {
proxy_pass http://127.0.0.1:5601/socket.io/;
proxy_redirect off;
}
location /dataset/ {
proxy_pass http://127.0.0.1:5601/dataset/;
proxy_redirect off;
}
location /translations/ {
proxy_pass http://127.0.0.1:5601/translations/;
proxy_redirect off;
}
location ^~ /built_assets/ {
proxy_pass http://127.0.0.1:5601/built_assets/;
proxy_redirect off;
}
location /ui/ {
proxy_pass http://127.0.0.1:5601/ui/;
proxy_redirect off;
}
location /spaces/ {
proxy_pass http://127.0.0.1:5601/spaces/;
proxy_redirect off;
}
location /node_modules/ {
proxy_pass http://127.0.0.1:5601/node_modules/;
proxy_redirect off;
}
location /bootstrap.js {
proxy_pass http://127.0.0.1:5601/bootstrap.js;
proxy_redirect off;
}
location /internal/ {
proxy_pass http://127.0.0.1:5601/internal/;
proxy_redirect off;
}
location ~ "^/([\d]{5}/.*)" {
proxy_pass http://127.0.0.1:5601/$1;
proxy_redirect off;
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_read_timeout 600;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment