Skip to content

Instantly share code, notes, and snippets.

View beenotung's full-sized avatar

Beeno Tung beenotung

View GitHub Profile
@beenotung
beenotung / certbot-renew-crontab.txt
Last active March 23, 2024 11:18
crontab to auto renew https cert with certbot and nginx
# Launch the editor: sudo crontab -e
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
M H * * * certbot renew --post-hook "service nginx restart"
# M should be a random number range: 0..59
# H should be a random number range: 0..23
@beenotung
beenotung / template.nginx
Last active April 10, 2024 08:55
nginx port forward to nodejs
server {
listen 80;
listen [::]:80;
server_name example.cc;
# client_max_body_size 1M;
location / {
proxy_pass http://localhost:8080;