Skip to content

๐Ÿ’ก How To? ๋„๋ฉ”์ธ ์„ค์ •ํ•˜๊ธฐ

KyungMin Lee edited this page Aug 22, 2024 · 1 revision
  • DNS ์„œ๋ธŒ ๋„๋ฉ”์ธ ์ถ”๊ฐ€

image

  • ssl ์ธ์ฆ์„œ ์ถ”๊ฐ€
sudo certbot --nginx -d logbat.info -d www.logbat.info -d api.logbat.info -d sdk.logbat.info
cd /etc/nginx/sites-enabled
sudo vi default
  • nginx ์„ค์ • ์ถ”๊ฐ€
server {
    listen 80;
    listen [::]:80;
    server_name sdk.logbat.info;

    return 301 https://$host$request_uri; # HTTP ์š”์ฒญ์„ HTTPS๋กœ ๋ฆฌ๋””๋ ‰์…˜
    # managed by Certbot
}
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name sdk.logbat.info;

    ssl_certificate /etc/letsencrypt/live/logbat.info/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/logbat.info/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    root /var/www/sdk;  # ์ •์  ํŒŒ์ผ์ด ์žˆ๋Š” ๊ฒฝ๋กœ๋กœ ์„ค์ •ํ•˜์„ธ์š”

    location / {
        try_files $uri $uri/ =404;
    }
}
  • /var/www/sdk ์•„๋ž˜์— ์ •์  ํŒŒ์ผ ์ถ”๊ฐ€

  • nginx ์žฌ์‹œ์ž‘

sudo nginx -t
sudo systemctl restart nginx

https://sdk.logbat.info/sdk.js

๐Ÿงซ ํŒ€ ๋ฌธํ™”

โš™๏ธ ๊ตฌ์„ฑ

๐Ÿ”จ ๊ฐœ๋ฐœ ์œ„ํ‚ค

๐Ÿž Bug Report

๐Ÿงช Test Logs

Clone this wiki locally