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 HTTPS Support - Proxy / HTTPS #135

Closed
Donrskbb opened this issue Mar 25, 2022 · 2 comments
Closed

SSL HTTPS Support - Proxy / HTTPS #135

Donrskbb opened this issue Mar 25, 2022 · 2 comments

Comments

@Donrskbb
Copy link

How do i make the bot website HTTPS ready?

@aniq12
Copy link

aniq12 commented May 1, 2022

How do i make the bot website HTTPS ready?

tomato already make the video how to do that

@Tomato6966
Copy link
Owner

You can either check my video:

Musicium-VPS related: https://www.youtube.com/watch?v=yPBo2Gbp9VY
General Websites with standalone webserver: https://www.youtube.com/watch?v=mhYLoP9ncXA&t=157s

or use a proxy manager such as "nginx"

here is MY config:

nano /etc/nginx/sites-enabled/reverse-proxy.conf
server {
    listen 80;
        listen [::]:80 ipv6only=on;
    server_name your.domain.com *.your.domain.com; 
    return 301 https://your.domain.com$request_uri;
}
server {
    server_name your.domain.com;
    location / {
        proxy_pass http://localhost:3001;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
    listen 443 ssl;
        listen [::]:443 ssl;
    ssl_certificate /etc/letsencrypt/live/your.domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/your.domain.com/privkey.pem; 
    include /etc/letsencrypt/options-ssl-nginx.conf; 
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

To install a CERTBOT SSL for NGINX run these:

apt-get install python3-certbot-nginx 

certbot --nginx -d your.domain.com

Make sure to install the ssl certificiates using CERTBOT SSL first before setting up the nginx server:

apt-get install nginx
apt-get install python3-certbot-nginx
certbot --nginx -d your.domain.com
nano /etc/nginx/sites-enabled/reverse-proxy.conf # fill in the details
systemctl start nginx

@Tomato6966 Tomato6966 pinned this issue May 16, 2022
Repository owner locked and limited conversation to collaborators May 16, 2022
@Tomato6966 Tomato6966 changed the title SSL HTTPS Request SSL HTTPS Support - Proxy / HTTPS May 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants