Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
tips:ssl [2017/05/26 14:47] – [certificate integration for apache] scipio | tips:ssl [2019/02/22 15:20] – [nginx] scipio | ||
---|---|---|---|
Line 5: | Line 5: | ||
[[https:// | [[https:// | ||
+ | ===== certbot ====== | ||
+ | |||
+ | < | ||
+ | add-apt-repository ppa: | ||
+ | apt-get update | ||
+ | apt-get install -y certbot python-certbot-nginx | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | certbot certonly --webroot -w / | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== nginx ==== | ||
+ | |||
+ | < | ||
+ | server { | ||
+ | listen 80; | ||
+ | server_name nextcloud.csgalileo.org; | ||
+ | server_tokens off; | ||
+ | |||
+ | location / | ||
+ | root /var/www; | ||
+ | allow all; | ||
+ | } | ||
+ | |||
+ | location / { | ||
+ | return 301 https:// | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | server { | ||
+ | listen 443; | ||
+ | server_name nnextcloud.csgalileo.org; | ||
+ | | ||
+ | ssl_certificate / | ||
+ | ssl_certificate_key / | ||
+ | | ||
+ | } | ||
+ | </ | ||
===== acme.sh integration for letsencrypt ===== | ===== acme.sh integration for letsencrypt ===== | ||