{"id":2366,"date":"2021-06-15T12:58:04","date_gmt":"2021-06-15T03:58:04","guid":{"rendered":"https:\/\/www.choco.org.uk\/chocodb\/?p=2366"},"modified":"2021-09-22T11:21:16","modified_gmt":"2021-09-22T02:21:16","slug":"nadesiko3%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ae%e4%bd%9c%e3%82%8a%e6%96%b9%e3%81%9d%e3%81%ae%ef%bc%92-2","status":"publish","type":"post","link":"https:\/\/www.choco.org.uk\/chocodb\/?p=2366","title":{"rendered":"Nadesiko3\u30b5\u30fc\u30d0\u30fc\u306e\u4f5c\u308a\u65b9\u305d\u306e\uff12"},"content":{"rendered":"<a href=\"https:\/\/www.choco.org.uk\/chocodb\/?p=2366&amp;print=1\" title=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" rel=\"nofollow\"><img decoding=\"async\" class=\"WP-PrintIcon\" src=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/plugins\/wp-print\/images\/print.gif\" alt=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" title=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" style=\"border: 0px;\" \/><\/a>&nbsp;<a href=\"https:\/\/www.choco.org.uk\/chocodb\/?p=2366&amp;print=1\" title=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" rel=\"nofollow\">\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002<\/a>\n<p>\u301020210731\u4fee\u6b63\u3011<br \/>\n\u300cSAKURA VPS\u300d\u3067OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306bNGINX\u3092\u6307\u5b9a\u3057\u3066\u5165\u308c\u305f\u3089\u5927\u5931\u6557\u3060\u3063\u305f\u306e\u3067\uff08LETSENCRYPT\u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u826f\u3044\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u304c\u3002\uff09\u3001\u5358\u4f53\u3067<span style=\"color: #ff00ff;\">CentosStream8<\/span>\u3092\u5165\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u306f\u65e2\u5b58\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u5b9f\u65bd\uff08\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002\uff09<br \/>\n\uff1eyum update<\/p>\n<p>NGINX\u3092YUM\u3067\u5165\u308c\u307e\u3059\u3002<br \/>\n\uff1eyum install nginx<br \/>\n\uff1esystemctl start nginx<br \/>\n\uff1esystemctl enable nginx<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u30c9\u30e1\u30a4\u30f3\u3092\u5165\u529b\u3057\u3066\u3001\u3053\u3093\u306a\u753b\u9762\u304c\u51fa\u308c\u3070\uff2f\uff2b\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nginx01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-2565\" src=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nginx01-150x150.png\" alt=\"nginx\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nginx01-150x150.png 150w, https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nginx01-144x144.png 144w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>Version 1.1.20\u304c\u5165\u308a\u307e\u3057\u305f\u3002\u3055\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306f\u3069\u3046\u304b\u306a\u3002\u3002\u3002\uff08\u30c9\u30ad\u30c9\u30ad<\/p>\n<p>\/usr\/sbin\/nginx\uff08\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\uff09<br \/>\n\/etc\/nginx\/nginx.conf\uff08\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff09<\/p>\n<h3><strong><span style=\"color: #0000ff;\">\u30ef\u30f3\u30c0\u30d5\u30eb\u3067\u3059\uff01\uff01\uff01\uff01\uff08THE\u30c7\u30d5\u30a9\u30eb\u30c8\u914d\u7f6e\uff09<\/span><\/strong><\/h3>\n<p>\u65e9\u901f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n\uff1ecat \/etc\/nginx\/nginx.conf<\/p>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306f\u300c\/usr\/share\/nginx\/html\u300d\u3067\u3057\u305f\u3002<br \/>\n\u307e\u3055\u306b\u6559\u79d1\u66f8\u306b\u8f09\u3063\u3066\u3044\u308b\u304b\u306e\u3088\u3046\u306a\u914d\u7f6e\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u304a\u624b\u672c\u306e\u69d8\u306a\u914d\u7f6e\u3060\u304b\u3089\u3053\u305d\u51fa\u6765\u308b\u5fc5\u6bba\u306e\u30b3\u30de\u30f3\u30c9\u3067\u300ccertbot\u300d\u3092\u5165\u308c\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306f\u4e0b\u6e96\u5099\u3067\u3059\u3002\u300ccertbot\u300d\u3092\u5165\u308c\u308b\u70ba\u306b\u300csnapd\u300d\u3092\u5c0e\u5165\u3057\u307e\u3059\u3002<\/p>\n<p>\uff1eyum install epel-release<br \/>\n\uff1eyum install snapd<br \/>\n\uff1esystemctl enable &#8211;now snapd.socket\uff08\u3053\u3053\u306f\u30cf\u30a4\u30d5\u30f3\u304c\uff12\u3064\u5165\u3063\u3066\u307e\u3059\u306e\u3067\u6ce8\u610f\uff01\uff09<br \/>\n\uff1eln -s \/var\/lib\/snapd\/snap \/snap<br \/>\n\uff1esnap install &#8211;classic certbot\uff08\u3053\u3053\u306f\u30cf\u30a4\u30d5\u30f3\u304c\uff12\u3064\u5165\u3063\u3066\u307e\u3059\u306e\u3067\u6ce8\u610f\uff01\uff09<br \/>\n\uff1eln -s \/snap\/bin\/certbot \/usr\/bin\/certbot<\/p>\n<p>\u6642\u3005\u3053\u3093\u306a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u307e\u3059\u3002<br \/>\n<span style=\"color: #ff0000;\">too early for operation, device not yet seeded or device model not acknowledged<\/span><br \/>\n\u3053\u306e\u5834\u5408\u306f\u3057\u3070\u3089\u304f\u5f85\u3063\u3066\u3001\u3082\u3046\u4e00\u5ea6\u540c\u3058\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3061\u3083\u3093\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b8c\u4e86\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n[root@ik1-xxx-xxxxx ~]# snap install &#8211;classic certbot\uff08\u3053\u3053\u306f\u30cf\u30a4\u30d5\u30f3\u304c\uff12\u3064\u5165\u3063\u3066\u307e\u3059\u306e\u3067\u6ce8\u610f\uff01\uff09<br \/>\n2021-07-31T19:16:31+09:00 INFO Waiting for automatic snapd restart&#8230;<br \/>\nWarning: \/var\/lib\/snapd\/snap\/bin was not found in your $PATH. If you&#8217;ve not restarted your<br \/>\nsession since you installed snapd, try doing that. Please see<br \/>\nhttps:\/\/forum.snapcraft.io\/t\/9469 for more details.<\/p>\n<p><span style=\"color: #0000ff;\">\u6ce8\uff11\uff09\u3053\u3053\u3067\u4e00\u65e6\u3001\u6b62\u3081\u3066NGINX\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u30c9\u30e1\u30a4\u30f3\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<\/span><br \/>\n<span style=\"color: #0000ff;\">\uff1evi \/etc\/nginx\/nginx.conf<\/span><\/p>\n<p>39\u884c\u76ee\u3042\u305f\u308a\u306e\u300cSERVER_NAME\u300d\u3067\u3059\u3002\u3053\u308c\u304c\u30d6\u30e9\u30f3\u30af\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u53d6\u5f97\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u3092\u3053\u3053\u306b\u8a18\u8f09\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p>\u7121\u4e8b\u5165\u3063\u305f\u3089\u3001\u6b21\u306f\u30c9\u30e1\u30a4\u30f3\u306e\u8a2d\u5b9a\u3067\u3059\u3002\uff08HTTPS\u8a2d\u5b9a\uff09<br \/>\n\uff1ecertbot &#8211;nginx\uff08\u3053\u3053\u306f\u30cf\u30a4\u30d5\u30f3\u304c\uff12\u3064\u5165\u3063\u3066\u307e\u3059\u306e\u3067\u6ce8\u610f\uff01\uff09<\/p>\n<p>[root@ik1-44-33333 \/]# certbot &#8211;nginx\uff08\u3053\u3053\u306f\u30cf\u30a4\u30d5\u30f3\u304c\uff12\u3064\u5165\u3063\u3066\u307e\u3059\u306e\u3067\u6ce8\u610f\uff01\uff09<br \/>\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log<br \/>\nPlugins selected: Authenticator nginx, Installer nginx<br \/>\nEnter email address (used for urgent renewal and security notices)<br \/>\n(Enter &#8216;c&#8217; to cancel): <span style=\"color: #ff00ff;\">xxxxxxxx@gmail.com<\/span><br \/>\nStarting new HTTPS connection (1): acme-v02.api.letsencrypt.org<\/p>\n<p>&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<br \/>\nPlease read the Terms of Service at<br \/>\nhttps:\/\/letsencrypt.org\/documents\/LE-SA-v1.2-November-15-2017.pdf. You must<br \/>\nagree in order to register with the ACME server. Do you agree?<br \/>\n&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<br \/>\n(Y)es\/(N)o:<span style=\"color: #ff00ff;\"> Y<\/span><\/p>\n<p>&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<br \/>\nWould you be willing, once your first certificate is successfully issued, to<br \/>\nshare your email address with the Electronic Frontier Foundation, a founding<br \/>\npartner of the Let&#8217;s Encrypt project and the non-profit organization that<br \/>\ndevelops Certbot? We&#8217;d like to send you email about our work encrypting the web,<br \/>\nEFF news, campaigns, and ways to support digital freedom.<br \/>\n&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<br \/>\n(Y)es\/(N)o: <span style=\"color: #ff00ff;\">Y<\/span><br \/>\nAccount registered.<br \/>\nNo names were found in your configuration files. Please enter in your domain<br \/>\nname(s) (comma and\/or space separated) (Enter &#8216;c&#8217; to cancel): <span style=\"color: #ff00ff;\">nako.tokyo<\/span><br \/>\nRequesting a certificate for nako.tokyo<br \/>\nPerforming the following challenges:<br \/>\nhttp-01 challenge for nako.tokyo<br \/>\nWaiting for verification&#8230;<br \/>\nCleaning up challenges<br \/>\nDeploying Certificate to VirtualHost \/etc\/nginx\/nginx.conf<br \/>\nRedirecting all traffic on port 80 to ssl in \/etc\/nginx\/nginx.conf<\/p>\n<p>&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<br \/>\n<span style=\"color: #ff0000;\">Could not automatically find a matching server block for nako.tokyo.Set the `server_name` directive to use the Nginx installer<\/span><\/p>\n<p>\u30a8\u30e9\u30fc\u3067\u3059\u3001\u30a8\u30e9\u30fc\u3067\u3059\uff01<br \/>\n\u300cSERVER_NAME\u300d\u3092\u30bb\u30c3\u30c8\u3057\u308d\u3068\u53eb\u3093\u3067\u307e\u3059\u3002<br \/>\n<strong><span style=\"color: #ff00ff;\">\u6ce8\uff11\uff09\u3092\u5b9f\u65bd\u3057\u3066\u3044\u308b\u3068\u4e0a\u8a18\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002<\/span><\/strong><\/p>\n<p>\u3067\u3082\u3001\u5b9f\u969b\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f\u6210\u529f\u3057\u3066\u307e\u3057\u305f\u3002<\/p>\n<p>\uff1evi \/etc\/nginx\/nginx.conf<\/p>\n<p>server {<br \/>\nlisten 80;<br \/>\nlisten [::]:80;<br \/>\n<strong><span style=\"color: #ff00ff;\">server_name _;<\/span><\/strong><br \/>\nroot \/usr\/share\/nginx\/html;<\/p>\n<p>\u3053\u308c\u306f\u6012\u3089\u308c\u308b\u8a33\u3067\u3059\u306d\u3002\u4eca\u56de\u306e\u5834\u5408\u3067\u3059\u304cIP\u30a2\u30c9\u30ec\u30b9\u304b\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u8a3c\u660e\u66f8\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u3053\u306e\u8fba\u306b\u3042\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n&#8211; Congratulations! Your certificate and chain have been saved at:<br \/>\n\/etc\/letsencrypt\/live\/nako.tokyo\/fullchain.pem<br \/>\nYour key file has been saved at:<br \/>\n\/etc\/letsencrypt\/live\/nako.tokyo\/privkey.pem<\/p>\n<p>\u6700\u7d42\u7684\u306b\u52d5\u4f5c\u3057\u305f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8f09\u305b\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>1 # For more information on configuration, see:<br \/>\n2 # * Official English Documentation: http:\/\/nginx.org\/en\/docs\/<br \/>\n3 # * Official Russian Documentation: http:\/\/nginx.org\/ru\/docs\/<br \/>\n4<br \/>\n5 user nginx;<br \/>\n6 worker_processes auto;<br \/>\n7 error_log \/var\/log\/nginx\/error.log;<br \/>\n8 pid \/run\/nginx.pid;<br \/>\n9<br \/>\n10 # Load dynamic modules. See \/usr\/share\/doc\/nginx\/README.dynamic.<br \/>\n11 include \/usr\/share\/nginx\/modules\/*.conf;<br \/>\n12<br \/>\n13 events {<br \/>\n14 worker_connections 1024;<br \/>\n15 }<br \/>\n16<br \/>\n17 http {<br \/>\n18 log_format main &#8216;$remote_addr &#8211; $remote_user [$time_local] &#8220;$request&#8221; &#8216;<br \/>\n19 &#8216;$status $body_bytes_sent &#8220;$http_referer&#8221; &#8216;<br \/>\n20 &#8216;&#8221;$http_user_agent&#8221; &#8220;$http_x_forwarded_for&#8221;&#8216;;<br \/>\n21<br \/>\n22 access_log \/var\/log\/nginx\/access.log main;<br \/>\n23<br \/>\n24 sendfile on;<br \/>\n1 # For more information on configuration, see:<br \/>\n2 # * Official English Documentation: http:\/\/nginx.org\/en\/docs\/<br \/>\n3 # * Official Russian Documentation: http:\/\/nginx.org\/ru\/docs\/<br \/>\n4<br \/>\n5 user nginx;<br \/>\n6 worker_processes auto;<br \/>\n7 error_log \/var\/log\/nginx\/error.log;<br \/>\n8 pid \/run\/nginx.pid;<br \/>\n9<br \/>\n10 # Load dynamic modules. See \/usr\/share\/doc\/nginx\/README.dynamic.<br \/>\n11 include \/usr\/share\/nginx\/modules\/*.conf;<br \/>\n12<br \/>\n13 events {<br \/>\n14 worker_connections 1024;<br \/>\n15 }<br \/>\n16<br \/>\n17 http {<br \/>\n18 log_format main &#8216;$remote_addr &#8211; $remote_user [$time_local] &#8220;$request&#8221; &#8216;<br \/>\n19 &#8216;$status $body_bytes_sent &#8220;$http_referer&#8221; &#8216;<br \/>\n20 &#8216;&#8221;$http_user_agent&#8221; &#8220;$http_x_forwarded_for&#8221;&#8216;;<br \/>\n21<br \/>\n22 access_log \/var\/log\/nginx\/access.log main;<br \/>\n23<br \/>\n24 sendfile on;<br \/>\n25 tcp_nopush on;<br \/>\n26 tcp_nodelay on;<br \/>\n27 keepalive_timeout 65;<br \/>\n28 types_hash_max_size 2048;<br \/>\n29<br \/>\n30 include \/etc\/nginx\/mime.types;<br \/>\n31 default_type application\/octet-stream;<br \/>\n32<br \/>\n33 # Load modular configuration files from the \/etc\/nginx\/conf.d directory.<br \/>\n34 # See http:\/\/nginx.org\/en\/docs\/ngx_core_module.html#include<br \/>\n35 # for more information.<br \/>\n36 include \/etc\/nginx\/conf.d\/*.conf;<br \/>\n37<br \/>\n38 server {<br \/>\n39 server_name nako.tokyo;<br \/>\n40 root \/usr\/share\/nginx\/html;<br \/>\n41<br \/>\n42 # Load configuration files for the default server block.<br \/>\n43 include \/etc\/nginx\/default.d\/*.conf;<br \/>\n44<br \/>\n45 location \/ {<br \/>\n46 }<br \/>\n47<br \/>\n48 error_page 404 \/404.html;<br \/>\n49 location = \/40x.html {<br \/>\n50 }<br \/>\n51<br \/>\n52 error_page 500 502 503 504 \/50x.html;<br \/>\n53 location = \/50x.html {<br \/>\n54 }<br \/>\n55<br \/>\n56 listen [::]:443 ssl ipv6only=on; # managed by Certbot<br \/>\n57 listen 443 ssl; # managed by Certbot<br \/>\n58 ssl_certificate \/etc\/letsencrypt\/live\/nako.tokyo\/fullchain.pem; # managed by Certbot<br \/>\n59 ssl_certificate_key \/etc\/letsencrypt\/live\/nako.tokyo\/privkey.pem; # managed by Certbot<br \/>\n60 include \/etc\/letsencrypt\/options-ssl-nginx.conf; # managed by Certbot<br \/>\n61 ssl_dhparam \/etc\/letsencrypt\/ssl-dhparams.pem; # managed by Certbot<br \/>\n62<br \/>\n63 }<br \/>\n64<br \/>\n65 # Settings for a TLS enabled server.<br \/>\n66 #<br \/>\n67 # server {<br \/>\n68 # listen 443 ssl http2 default_server;<br \/>\n69 # listen [::]:443 ssl http2 default_server;<br \/>\n70 # server_name _;<br \/>\n71 # root \/usr\/share\/nginx\/html;<br \/>\n72 #<br \/>\n73 # ssl_certificate &#8220;\/etc\/pki\/nginx\/server.crt&#8221;;<br \/>\n74 # ssl_certificate_key &#8220;\/etc\/pki\/nginx\/private\/server.key&#8221;;<br \/>\n75 # ssl_session_cache shared:SSL:1m;<br \/>\n76 # ssl_session_timeout 10m;<br \/>\n77 # ssl_ciphers PROFILE=SYSTEM;<br \/>\n78 # ssl_prefer_server_ciphers on;<br \/>\n79 #<br \/>\n80 # # Load configuration files for the default server block.<br \/>\n81 # include \/etc\/nginx\/default.d\/*.conf;<br \/>\n82 #<br \/>\n83 # location \/ {<br \/>\n84 # }<br \/>\n85 #<br \/>\n86 # error_page 404 \/404.html;<br \/>\n87 # location = \/40x.html {<br \/>\n88 # }<br \/>\n89 #<br \/>\n90 # error_page 500 502 503 504 \/50x.html;<br \/>\n91 # location = \/50x.html {<br \/>\n92 # }<br \/>\n93 # }<br \/>\n94<br \/>\n95<br \/>\n96<br \/>\n97 server {<br \/>\n98 if ($host = nako.tokyo) {<br \/>\n99 return 301 https:\/\/$host$request_uri;<br \/>\n100 } # managed by Certbot<br \/>\n101<br \/>\n102<br \/>\n103 listen 80 default_server;<br \/>\n104 listen [::]:80 default_server;<br \/>\n105 server_name nako.tokyo;<br \/>\n106 return 404; # managed by Certbot<br \/>\n107<br \/>\n108<br \/>\n109 }}<br \/>\n110<\/p>\n<p>\u4eca\u307e\u3067\u306e\u82e6\u52b4\u306f\u4f55\u3060\u3063\u305f\u306e\u3060\u308d\u3046\u3002\u3002<\/p>\n<p>LestsEncrypt\u306f\u5e38\u306b80\u756a\u3067\u66f4\u65b0\u3092\u304b\u3051\u307e\u3059\u306e\u3067\u3001\u5fc5\u305a80\u756a\u30dd\u30fc\u30c8\u3092\u958b\u3051\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002(Firewall,etc)<\/p>\n<p>crontab\u3067\u8a2d\u5b9a\u3059\u308b\u6642\u306f\u30d5\u30eb\u30d1\u30b9\u3092\u63a8\u5968\u3057\u307e\u3059\u3002<br \/>\n$ crontab -l<br \/>\nPATH=\/usr\/local\/bin:\/usr\/sbin:\/bin:\/usr\/bin<\/p>\n<p>\u3053\u3053\u307e\u3067\u3084\u3063\u3066\u304a\u304d\u306a\u304c\u3089\u3001\u885d\u6483\u306e\u4e8b\u5b9f\u304c\u5224\u660e\u3057\u307e\u3057\u305f\u3002<br \/>\nNodejs\u306f\u3001WEB\u30b5\u30fc\u30d3\u30b9\u3092\u81ea\u524d\u3067\u6301\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u4e16\u754c\u4e2d\u3067\u30d7\u30ed\u30c0\u30af\u30c8\u3068\u3057\u3066\u904b\u7528\u3055\u308c\u3066\u3044\u308b\u00a0node.js\u00a0\u30b5\u30fc\u30d0\u3067\u306f\u3001\u524d\u6bb5\u306b\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u3068\u3057\u3066\u00a0nginx\u00a0\u3092\u7f6e\u304f\u3053\u3068\u304c\u307b\u3068\u3093\u3069\u306e\u3088\u3046\u3067\u3059\u3002\uff08\u8abf\u3079\u3066\u3082\u305d\u3093\u306a\u306e\u3070\u3063\u304b\u308a\u3067\u3057\u305f\u3002\u3002\u3002\uff09<br \/>\nnode.js\u00a0\u30b5\u30fc\u30d0\u306f\u00a08000\u00a0\u756a\u30dd\u30fc\u30c8\u3067\u8d77\u52d5\u3057\u3066\u304a\u304d\u3001nginx\u00a0\u306f\u00a080\u00a0\u756a\u30dd\u30fc\u30c8\u3067\u52d5\u304f\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u304f\u308b\u00a0HTTP\u00a0\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u307e\u305a\u00a0nginx\u00a0\u3067\u53d7\u3051\u3001nginx\u00a0\u306f\u00a0node.js\u00a0\u30b5\u30fc\u30d0\u306bHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u6e21\u3059\u3060\u3051\u306e\u5f79\u5272\u3068\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002<br \/>\n\u30b5\u30fc\u30d0\u306f\u5206\u3051\u308b\u5fc5\u8981\u304c\u306a\u304f\u3001\u540c\u4e00\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u00a0nginx\u00a0\u3068\u00a0node.js\u00a0\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3057\u3066\u3082\u826f\u3044\u3088\u3046\u3067\u3059\u3002<br \/>\nnginx\u00a0\u306f\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u3092\u51fa\u529b\u3001GZIP\u5727\u7e2e\u3084\u3001\u30b5\u30fc\u30d0\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u3082\u30ed\u30b0\u51fa\u529b\u53ef\u80fd\u306a\u306e\u3067\u30d3\u30b8\u30cd\u30b9\u306b\u306f\u3053\u308c\u3063\u307d\u3044\u3002<\/p>\n<p>\u3044\u3088\u3044\u3088\u3001\u6b21\u56de\u304b\u3089\u300c\u306a\u3067\u3057\u3053\uff13\u300d\u306e\u6e96\u5099\u306b\u5165\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u301020210731\u4fee\u6b63\u3011 \u300cSAKURA VPS\u300d\u3067OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306bNGINX\u3092\u6307\u5b9a\u3057\u3066\u5165\u308c\u305f\u3089\u5927\u5931\u6557\u3060\u3063\u305f\u306e\u3067\uff08LETSENCRYPT\u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u826f\u3044\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u304c\u3002\uff09\u3001\u5358\u4f53\u3067CentosStream8\u3092\u5165\u308c\u307e [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[103,172,39],"tags":[170,163,167,62],"class_list":["post-2366","post","type-post","status-publish","format-standard","hentry","category-nadesiko3","category-nginx","category-server","tag-centos-stream","tag-nginx","tag-sakura-vps","tag-62"],"_links":{"self":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2366"}],"version-history":[{"count":35,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2366\/revisions"}],"predecessor-version":[{"id":2698,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2366\/revisions\/2698"}],"wp:attachment":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}