(py36) [root@ip-10-0-0-51 tenn25blog]# python manage.py collectstatic
You have requested to collect static files at the destination
location as specified in your settings:
/opt/blog/tenn25blog/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/pagedown/Markdown.Converter.js'
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/pagedown/Markdown.Sanitizer.js'
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/pagedown/Markdown.Editor.js'
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/pagedown/wmd-buttons.png'
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/pagedown/LICENSE.txt'
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/css/pagedown.css'
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/js/jquery.cookie.js'
Copying '/opt/blog/py36/lib64/python3.6/site-packages/mezzanine_pagedown/static/mezzanine_pagedown/js/jquery.ba-throttle-debounce.min.js'
Found another file with the destination path 'admin/js/actions.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/actions.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
8 static files copied to '/opt/blog/tenn25blog/static', 412 unmodified.
Django プロジェクトを Lets Encrypt で HTTPS 化する
AWS のセキュリティグループで 443 ポートを解放する。
certbot のインストール
必要だったらやる
$ sudo yum install epel-release
CertBotのインストール
$ sudo yum install certbot
$ pwd
/opt/blog/tenn25blog/static
$ ls
admin css filebrowser fonts grappelli img js media mezzanine robots.txt test
Djnagoの場合静的ファイルはstaticにまとめてるので、そこを指定する。
$ sudo vi /etc/nginx/conf.d/blog.conf
location /.well-known {
root /opt/blog/tenn25blog/static;
}
$ sudo certbot certonly --webroot -w /opt/blog/tenn25blog/static -d www.tenn25.com
規約に同意しますか→(A)gree
電子フロンティア財団からの連絡を受け取りますか→(N)o
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/www.tenn25.com/fullchain.pem
と出たらOK!!!