Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSL support #65

Open
spikelu2016 opened this issue May 31, 2024 · 1 comment
Open

Add SSL support #65

spikelu2016 opened this issue May 31, 2024 · 1 comment

Comments

@spikelu2016
Copy link
Contributor

Currently, BricksLLM does not have a feature to provide SSL support

@sscotter
Copy link

Putting nginx in front of bricksllm and configuring that to handle the SSL works..

server {
    listen 443 ssl;

    server_name        bricksllm.example.local;

    access_log /var/log/nginx/access-vhost-local.example.bricksllm.log;
    error_log /var/log/nginx/error-vhost-local.example.bricksllm.log;

    ssl_certificate     /etc/nginx/ssl/bricksllm.example.local.cer;
    ssl_certificate_key /etc/nginx/ssl/bricksllm.example.local.key;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
    ssl_prefer_server_ciphers off;
    ssl_dhparam ssl/dhparams;

    ssl_ecdh_curve secp384r1:X25519:prime256v1;

    ssl_session_timeout 1d;
    ssl_session_cache shared:MozSSL:10m;  # about 40000 sessions
    ssl_session_tickets off;

    client_max_body_size 100M;

    location / {
        try_files $uri @bricksllm;
    }

    location @bricksllm {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Frame-Options SAMEORIGIN;
        proxy_http_version 1.1;
        proxy_pass        http://127.0.0.1:8001;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants