12:35 pm
Okay so Yesterday I helped Kevin, to setup Nginx proxy on AWS EC2 intance.
nginx config
server {
listen 80;
server_name kevinbytebattles.h3110fr13nd.me;
return 301 https://$server_name:8000$request_uri;
}
server {
listen 8000 ssl;
server_name kevinbytebattles.h3110fr13nd.me;
ssl_certificate /etc/letsencrypt/live/kevinbytebattles.h3110fr13nd.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/kevinbytebattles.h3110fr13nd.me/privkey.pem;
location / {
include proxy_params;
proxy_pass http://localhost:8000;
}
}Can be done anywhere in nginx.conf or default configs of sites-enabled and sites-available.
Certbot
Of course a domain and certbot is required to install certificates For nginx I guess it’s simple.
# certbot --nginx -d <your domain or subdomain>
certbot --nginx -d h3110fr13nd.me -d blog.h3110fr13nd.meLinks : Tags : Year : 2024 Month : February 24, February Date : 10th February, Saturday, 2024, 10th February Category: Daily