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

ssl #8

Open
rafalohaki opened this issue Aug 4, 2021 · 4 comments
Open

ssl #8

rafalohaki opened this issue Aug 4, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@rafalohaki
Copy link

open sssl.crt: no such file or directory
launch via docker...

@ZizzyDizzyMC
Copy link
Owner

I've been away from the project for a bit working on IRL things, I will come back and attempt to resolve this when possible.

@ZizzyDizzyMC ZizzyDizzyMC added the bug Something isn't working label Aug 9, 2021
@luckman212
Copy link

Anyone figure out a way? can we use nginx in front and proxy to backend?

@ZizzyDizzyMC
Copy link
Owner

You can definitely use nginx to proxy linx-server.

This is a default config that'll work with most installations, change your values to be your own:

server {
                listen 80;
                listen 443 ssl;
                server_name www.domain.tld;
                ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
                ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;
                location /.well-known/ {
                        root /var/www/html;
                }
                location / {
                        return 301 https://domain.tld$request_uri;
                }
}

server {
        listen 80;
        server_name domain.tld;
        location /.well-known/ {
                root /var/www/html;
        }
        location / {
                        return 301 https://$server_name$request_uri;
        }
}
server {
                listen 443 ssl;
                server_name domain.tld;
                ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
                ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;
                location / {
                                client_max_body_size 3072M;
                                proxy_pass_header Content-Type;
                                proxy_pass http://127.0.0.1:8080;
                                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                                proxy_set_header Host $http_host;
                }
}

To use, comment out the SSL from the first block and set up your cert with certbot.
Once certbot confirms the cert's in place, add back in ssl and the final block with ssl.
proxy_pass is whatever ip:port you have linx-server running on, either locally or elsewhere.

@luckman212
Copy link

Good stuff - I got it working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants