{"id":73,"date":"2019-07-06T16:51:22","date_gmt":"2019-07-06T07:51:22","guid":{"rendered":"https:\/\/wordpress.k8s.yukiafronia.com\/?p=73"},"modified":"2020-08-10T16:15:57","modified_gmt":"2020-08-10T07:15:57","slug":"%e3%82%aa%e3%83%b3%e3%83%a9%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%ac%e3%83%bc%e3%82%b8%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0-nextcloud%e7%92%b0%e5%a2%83-%e3%82%b5%e3%83%96%e3%83%87%e3%82%a3%e3%83%ac","status":"publish","type":"post","link":"https:\/\/blog.yukiafronia.com\/?p=73","title":{"rendered":"\u30aa\u30f3\u30e9\u30a4\u30f3\u30b9\u30c8\u30ec\u30fc\u30b8\u30b7\u30b9\u30c6\u30e0 Nextcloud\u74b0\u5883 \u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u6271\u3044\u3067\u5efa\u3066\u3066\u307f\u305f!"},"content":{"rendered":"<p>\u7686\u3055\u3093\u3001\u3053\u3093\u3061\u308f<br \/>\n\u76f8\u5909\u308f\u3089\u305a\u306e\u30d4\u30f3\u6751\u3067\u3054\u3056\u3044\u307e\u3059\u3002<br \/>\n\u5f0a\u30b5\u30fc\u30af\u30eb\u306b\u306f\u5c02\u6709\u30b5\u30fc\u30d0\u30fc\u3064\u307e\u308a\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u306e\u30b5\u30fc\u30d0\u30fc\u304c\u3054\u3056\u3044\u307e\u305b\u3093\u3002(IT\u7cfb\u30b5\u30fc\u30af\u30eb\u306a\u306e\u306b)<br \/>\n\u305d\u3053\u3067\u3001\u3053\u3053\u6700\u8fd1\u30d6\u30ec\u30fc\u30c9\u30b5\u30fc\u30d0\u30fc\u3067\u3082\u8cb7\u3063\u3066\u5f0a\u30b5\u30fc\u30af\u30eb\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u74b0\u5883\uff0b\u30aa\u30f3\u30e9\u30a4\u30f3\u30b9\u30c8\u30ec\u30fc\u30b8\u30b7\u30b9\u30c6\u30e0\u306e\u4e21\u74b0\u5883\u3092\u5efa\u3066\u3066\u3057\u307e\u3048\u3070\u4f7f\u3044\u52dd\u624b\u975e\u5e38\u306b\u3044\u3044\u306e\u3067\u306f\uff1f\u3068\u601d\u3044\u81f3\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3061\u306a\u307f\u306b\u3001\u30d6\u30ec\u30fc\u30c9\u30b5\u30fc\u30d0\u30fc\u306b\u3057\u3088\u3046\u304b\u306a\u3063\u3066\u3044\u3046\u306e\u306f\u500b\u4eba\u7684\u8208\u5473\uff0b\u5927\u5b66\u306e\u30b5\u30fc\u30af\u30eb\u306b\u30d6\u30ec\u30fc\u30c9\u30b5\u30fc\u30d0\u30fc\u7f6e\u3044\u3066\u3042\u3063\u305f\u3089\u30ab\u30c3\u30b3\u3048\u3048\u3084\u308d \u3068\u3044\u3046\u9593\u629c\u3051\u306a\u8003\u3048\u3067\u3054\u3056\u3044\u307e\u3059\u3002 \u3048\u3047....<\/p>\n<p>\n\u6b32\u3057\u3044\u306e\u306f\u3001\u30b3\u30ec\u306d<br \/>\n<img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/60749970-5c5a3200-9f91-11e9-8aba-cb8bbc27f654.png\" alt=\"image\" \/><br \/>\n<strong><em>HPE C7000<\/em><\/strong><\/p>\n<p>\u3067\u304b\u3044\u3067\u3057\u3087\uff1f<br \/>\n\u3053\u308c\u7f6e\u3044\u3066\u3042\u3063\u305f\u3089\u4e00\u7a2e\u306e\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u3060\u308d\u3068\u8a00\u308f\u308c\u306a\u304f\u3082\u306a\u3044\u6c17\u306f\u3057\u307e\u3059\u304c\u305d\u308c\u3067\u3044\u3044\u3093\u3067\u3059\u3002<\/p>\n<p>\n\u3068\u3044\u3046\u308f\u3051\u3067\u672c\u984c\u623b\u308a\u307e\u3059\u3002  <\/p>\n<h2>Nextcloud\u3063\u3066\u306a\uff5e\u306b?<\/h2>\n<p>dropbox\u3084google drive\u3068\u4f3c\u305f\u3088\u306a\u3082\u306e\u3067\u5b8c\u5168\u81ea\u793e\u3067\u30aa\u30f3\u30e9\u30a4\u30f3\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u5efa\u3066\u305f\u3044\u3068\u304d\u306b\u4f7f\u3046\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002<br \/>\n\u306a\u304a\u3001\u3042\u308b\u7a0b\u5ea6\u30c6\u30fc\u30de\u306a\u3069\u3082\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u304c\u51fa\u6765\u308b\u305f\u3081\u975e\u5e38\u306b\u6c4e\u7528\u6027\u304c\u9ad8\u3044\u3067\u3059\u3002\u3055\u3089\u306b\u3001\u3082\u3068\u3082\u3068\u3042\u3063\u305fowncloud\u304b\u3089\u958b\u767a\u8005\u5074\u304c\u8131\u9000\u3057 &quot;\u3084\u3063\u3071OSS\u3060\u3088\u306d&quot; \u3068\u3044\u3046\u3053\u3068\u3067\u4f5c\u3089\u308c\u305f\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304cnextcloud\u306e\u305f\u3081\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u66f4\u65b0\u3084\u6a5f\u80fd\u66f4\u65b0\u3082\u6bd4\u8f03\u7684\u983b\u7e41\u306b\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u3058\u3083\u3042\u4eca\u56de\u306e\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u5efa\u3066\u3066\u307f\u305f\u3063\u3066\u306a\u3093\u306e\u30e1\u30ea\u30c3\u30c8\u3042\u3093\u306e?<\/h2>\n<p>\u3093\u30fc\u3063\u3068\u3001\u3067\u3059\u306d<br \/>\n\u5f0a\u30b5\u30fc\u30af\u30eb\u306e\u5834\u5408\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8(url\u76f4\u6253\u3061\u3059\u308b\u3068\u4e00\u756a\u6700\u521d\u306b\u51fa\u3066\u304f\u308b\u3068\u3053\u308d)\u306b\u30d6\u30ed\u30b0\u3092\u7f6e\u3044\u3066\u308b\u306e\u3067\u3001\u30c9\u30e1\u30a4\u30f3\u306e\u95a2\u4fc2\u4e0a\uff08\u304a\u91d1\u304c\u306a\u3044\uff09\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u8a2d\u7f6e\u3059\u308b\u3068 <a href=\"http:\/\/(url)\/\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\">http:\/\/(url)\/\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d<\/a> \u3068\u30b5\u30fc\u30d3\u30b9\u3092\u660e\u78ba\u306b\u5206\u3051\u308b\u3053\u3068\u304c\u5bb9\u6613\u306b\u306a\u308b\u305f\u30811\u53f0\u306e\u30b5\u30fc\u30d0\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3059\u308b\u969b\u975e\u5e38\u306b\u6709\u7528\u3067\u3059\u3002\u3000\u3000<br \/>\n  <\/p>\n<h2>\u5b9f\u969b\u306b\u5efa\u3066\u3066\u307f\u308b<\/h2>\n<p>\u307e\u3041\u3001CentOS7\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u304b\u3063\u98db\u3070\u3057\u307e\u3059\u3002<br \/>\n\u66f8\u304f\u306e\u304c\u9762\u5012\u306a\u306e\u3067....<\/p>\n<p>\n\u3067\u306f\u3001CentOS7 minimal\u74b0\u5883\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306e\u72b6\u614b\u3068\u4eee\u5b9a\u3057\u305f\u3046\u3048\u3067\u958b\u59cb\u3057\u307e\u3059\u3002  <\/p>\n<h3>1-1 OS\u306e\u8a2d\u5b9a<\/h3>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001SELinux\u3092disable\u306b...  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/60858759-45207c00-a1ff-11e9-9b63-6eca1604f511.png\" alt=\"image\" \/>  <\/p>\n<p>\u3064\u3044\u3067\u306b\u3001firewalld\u3082\u6b62\u3081\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u691c\u8a3c\u306a\u306e\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u3053\u3068\u306f\u5f8c\u3067\u8003\u3048\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u3087\u3046 (\u305d\u3046\u3044\u3063\u3066\u3001\u3044\u3064\u3082\u306a\u3044\u304c\u3057\u308d\u306e\u79c1)  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/60858897-caa42c00-a1ff-11e9-90cd-89b76e33dc38.png\" alt=\"image\" \/>  <\/p>\n<p>\u3053\u306e\u72b6\u614b\u3060\u3068\u3001firewalld\u306f\u307e\u3060\u751f\u304d\u3066\u304a\u308a\u307e\u3059\u306e\u3067\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u306e\u3061\u306b\u518d\u8d77\u52d5\u3092\u304b\u3051\u308b\u306e\u3067\u3068\u308a\u3042\u3048\u305a\u3053\u306e\u307e\u307e\u653e\u7f6e\u3067\u7d50\u69cb\u3067\u3059\u3002<br \/>\n\u306a\u304a\u3001systemctl disable firewalld\u3067\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u3066\u304a\u308a\u307e\u3059\u306e\u3067\u3057\u305f\u753b\u9762\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067 disable\u306b\u306a\u3063\u3066\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002(\u753b\u9762\u3068\u8868\u793a\u304c\u540c\u3058\u3067\u3042\u308c\u3070\u304a\uff4b)<\/p>\n<h3>1-2 \u5fc5\u8981\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>  <\/p>\n<pre><code>\nroot@localhost ~# vi \/etc\/yum.repo.d\/nginx.repo  \n[nginx-stable]\nname=nginx stable repo\nbaseurl=http:\/\/nginx.org\/packages\/centos\/$releasever\/$basearch\/\ngpgcheck=1\nenabled=1\ngpgkey=https:\/\/nginx.org\/keys\/nginx_signing.key<\/code><\/pre>\n<p>:wq \u3067\u4fdd\u5b58<\/p>\n<p>\n\u7d9a\u3044\u3066\u3001mariaDB\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u767b\u9332\u306b\u79fb\u308a\u307e\u3059\u3002  <\/p>\n<pre><code>root@localhost ~# vi \/etc\/yum.repos.d\/mariadb.repo  \n# MariaDB 10.4 CentOS repository list - created 2019-07-05 10:32 UTC\n# http:\/\/downloads.mariadb.org\/mariadb\/repositories\/\n[mariadb]\nname = MariaDB\nbaseurl = http:\/\/yum.mariadb.org\/10.4\/centos7-amd64\ngpgkey=https:\/\/yum.mariadb.org\/RPM-GPG-KEY-MariaDB\ngpgcheck=1  \n<\/code><\/pre>\n<p>\u3053\u3053\u3082\u540c\u3058\u304f\u3001 :wq \u3067\u4fdd\u5b58<\/p>\n<p>\u7d9a\u3044\u3066\u3001remi \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3057\u307e\u3059\u3002<br \/>\n\u3044\u3064\u3082\u901a\u308a\u3068\u8a00\u3063\u3066\u306f\u4f55\u3067\u3059\u304c\u3001PHP\u5c0e\u5165\u306e\u969b\u306b\u5fc5\u8981\u306b\u306a\u308b\u4f5c\u696d\u3067\u3059\u306d\u3002  <\/p>\n<pre><code>root@localhost ~# yum -y install http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm  \n\nroot@localhost ~# vi \/etc\/yum.repos.d\/remi-php73.repo  \n# This repository only provides PHP 7.3 and its extensions\n# NOTICE: common dependencies are in &quot;remi-safe&quot;\n\n[remi-php73]\nname=Remi&#039;s PHP 7.3 RPM repository for Enterprise Linux 7 - $basearch\n#baseurl=http:\/\/rpms.remirepo.net\/enterprise\/7\/php73\/$basearch\/\n#mirrorlist=https:\/\/rpms.remirepo.net\/enterprise\/7\/php73\/httpsmirror\nmirrorlist=http:\/\/cdn.remirepo.net\/enterprise\/7\/php73\/mirror\n\nenabled=0  \n\u3053\u3053\u3092\u3001enabled=1\u306b\u5909\u66f4\u3059\u308b\u3002\n\ngpgcheck=1\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-remi\n<\/code><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u7d42\u308f\u3063\u305f\u3089 :wq \u3067\u4fdd\u5b58  <\/p>\n<p>\u3053\u3053\u307e\u3067\u3067\u3001nginx , mariadb , remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306ePHP\u307e\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u767b\u9332\u304c\u6e08\u307f\u307e\u3057\u305f\u306e\u3067\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002  <\/p>\n<pre><code>\nroot@localhost ~# yum -y install php php-fpm php-gmp php-mbstring php-mcrypt php-mysqlnd php-opc ache php-pear-Net-Curl php-pecl-redis php-pecl-zip php-soap php-intl php-ldap php-gd nginx MariaDB-server MariaDB-client bzip2 wget  \n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/62002018-9bd8f180-b0eb-11e9-9547-828dcf8a28a6.png\" alt=\"image\" \/><\/p>\n<p>\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3068\u3001\u5168\u3066\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u9806\u5f53\u306b\u5165\u308b &quot;\u306f\u305a&quot; \u3067\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u307e\u3067\u306b15\u5206\u5c11\u3005\u6642\u9593\u304c\u304b\u304b\u308b\u306e\u3067\u30b3\u30fc\u30d2\u30fc\u3067\u3082\u5165\u308c\u3066\u3086\u3063\u304f\u308a\u98f2\u3093\u3067\u307e\u3057\u3087\u3046\u3002  <\/p>\n<h3>1-3 \u5404\u7a2e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u304a\u3051\u308b\u8a2d\u5b9a<\/h3>\n<p>\u3067\u306f\u3001\u3053\u3053\u307e\u3067\u3068\u308a\u3042\u3048\u305a\u7d42\u308f\u308a\u307e\u3057\u305f\u3089\u5c0e\u5165\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\u306a\u304a\u3001\u3053\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\u306fOS\u304c\u518d\u8d77\u52d5\u307e\u305f\u306f\u901a\u5e38\u8d77\u52d5\u304b\u3089\u306e\u307f\u6709\u52b9\u3067\u3059\u3002<br \/>\n\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u305f\u6642\u70b9\u3067\u306f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8d77\u52d5\u307e\u3067\u884c\u308f\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u7559\u610f\u3057\u307e\u3057\u3087\u3046\u3002  <\/p>\n<pre><code>root@localhost ~# systemctl enable nginx  \nroot@localhost ~# systemctl enable php-fpm  \nroot@localhost ~# systemctl enable mariadb  \n# nginx , php-fpm , mariadb \u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\u3092\u6709\u52b9\u5316  \n<\/code><\/pre>\n<p>\u7d9a\u3044\u3066php\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b \/var\/lib\/php \u306b\u5bfe\u3057\u3066\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6240\u6709\u8005\u3092 &quot;nginx&quot; \u3078\u5909\u66f4\u3057\u307e\u3059\u3002  <\/p>\n<pre><code>\nroot@localhost ~# chown nginx:nginx \/var\/lib\/php\/ -R  \n<\/code><\/pre>\n<p>\u7d9a\u3051\u3066\u3001nginx \u95a2\u9023\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002  <\/p>\n<pre><code>root@localhost ~# rm -rf \/etc\/nginx\/conf.d\/default.conf  \n#\u4eca\u56de\u306f\u3001nginx \u306e conf\u304c\u975e\u5e38\u306b\u9577\u3044\u306e\u3067default.conf\u3092\u3044\u3063\u305f\u3093\u524a\u9664\u3057\u3001  \n#\u65b0\u3057\u304f\/etc\/nginx\/conf.d\/default.conf\u3000\u3068\u3044\u3046\u306e\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002  \n\nroot@localhsost ~# vi \/etc\/nginx\/conf.d\/default.conf  \n\nupstream php-handler {\n    server unix:\/var\/run\/php-fpm\/php-fpm.sock;\n}\n\nserver {\n    listen       80;\n    server_name  test.labo;\n    rewrite     ^ https:\/\/test.labo$request_uri?;\n}\n\nserver {\n    listen       443 ssl http2;\n    #listen       [::]:443 ssl http2;\n    server_name  test.labo;\n    root         \/usr\/share\/nginx\/html\/wordpress\/;\n    error_log \/var\/log\/nginx\/error.log warn;\n\n    ssl_certificate \/etc\/nginx\/cert\/nextcloud.crt;\n    ssl_certificate_key \/etc\/nginx\/cert\/nextcloud.key;\n\n    ssl_session_cache shared:SSL:1m;\n    ssl_session_timeout  5m;\n\n    ssl_protocols TLSv1.1 TLSv1.2;\n\n    ssl_prefer_server_ciphers on;\n    ssl_ciphers &#039;kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 DES-CBC3-SHA +SHA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !EXP !PSK !SRP !CAMELLIA !SEED&#039;;\n\n    index index.php;\n\n    location ~* \/wp-config.php {\n        deny all;\n    }\n\n    #location ~* \/wp-login\\.php|\/wp-admin\/((?!admin-ajax\\.php).)*$ {\n    #  auth_basic &quot;Please enter your name and password&quot;;\n    #  auth_basic_user_file  &quot;\/usr\/share\/nginx\/html\/wordpress\/.htpasswd&quot;;\n    #}\n\n    # For NextCloud\n    # Protecting sensitive files from the evil outside world\n    location ~ ^\/nextcloud\/(data|config|\\.ht|db_structure.xml|README) {\n        deny all;\n    }\n\n    location ^~ \/nextcloud {\n\n        root \/usr\/share\/nginx\/html\/;\n\n        # set max upload size\n        client_max_body_size 10G;\n        fastcgi_buffers 64 4K;\n\n        # Disable gzip to avoid the removal of the ETag header\n        gzip off;\n\n        # Uncomment if your server is build with the ngx_pagespeed module\n        # This module is currently not supported.\n        #pagespeed off;\n\n        index index.php;\n\n        error_page 403 \/nextcloud\/core\/templates\/403.php;\n        error_page 404 \/nextcloud\/core\/templates\/404.php;\n\n        location ~ ^\/nextcloud\/(?:\\.htaccess|data|config|db_structure\\.xml|README) {\n            deny all;\n        }\n\n        rewrite ^\/nextcloud\/caldav(.*)$ \/nextcloud\/remote.php\/caldav$1 redirect;\n        rewrite ^\/nextcloud\/carddav(.*)$ \/nextcloud\/remote.php\/carddav$1 redirect;\n        rewrite ^\/nextcloud\/webdav(.*)$ \/nextcloud\/remote.php\/webdav$1 redirect;\n\n        rewrite ^\/nextcloud\/core\/doc\/([^\\\/]+)(?:$|\/) \/nextcloud\/core\/doc\/$1\/index.html;\n\n        try_files $uri $uri\/ \/nextcloud\/index.php;\n\n        location ~ \\.php(?:$|\/) {\n            fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\n            include fastcgi_params;\n            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n            fastcgi_param PATH_INFO $fastcgi_path_info;\n            fastcgi_param HTTPS on;\n            fastcgi_pass php-handler;\n        }\n\n        # Optional: set long EXPIRES header on static assets\n        location ~* \\.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {\n            expires 30d;\n            # Optional: Don&#039;t log access to assets\n            access_log off;\n        }\n\n    }\n\n    location ~ \\.php$ {\n       fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\n       include  fastcgi_params;\n       fastcgi_index index.php;\n       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n       fastcgi_param PATH_INFO $fastcgi_script_name;\n       fastcgi_pass php-handler;\n    }\n}\n<\/code><\/pre>\n<p>nginx \u306e default.conf \u306f\u4e0a\u8a18\u306e\u901a\u308a<br \/>\n\u306a\u304a\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067FQDN\u3092\u4f7f\u3063\u3066nextcloud , wordpress \u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u5834\u5408\u306fnginx \u306e default.conf\u5185\u306etest.labo \u3068\u660e\u8a18\u3055\u308c\u3066\u3042\u308b\u90e8\u5206\u3092\u4efb\u610f\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u3002<\/p>\n<p>\n\u30aa\u30ec\u30aa\u30ec\u8a3c\u660e\u66f8\u3068\u3044\u3046\u3082\u306e\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u30aa\u30ec\u30aa\u30ec\u8a3c\u660e\u66f8\u3068\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067SSL\u3092\u7528\u3044\u3066\u901a\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u4fe1\u983c\u3067\u304d\u306a\u3044\u8a3c\u660e\u66f8\u3068\u3057\u3066\u8b66\u544a\u753b\u9762\u304c\u51fa\u3066\u3044\u305f\u308a\u3068\u3042\u308a\u307e\u3059\u304c\u305d\u3046\u3044\u3063\u305f\u3082\u306e\u3092\u56de\u907f\u51fa\u6765\u305f\u308a\u3059\u308b\u3082\u306e\u3067\u3059\u3002<br \/>\n\u3053\u3053\u3067\u306f\u3001\u8b66\u544a\u753b\u9762\u304c\u51fa\u308b\u3068\u601d\u3044\u307e\u3059\u304cSSL\u901a\u4fe1\u3067\u3084\u308a\u53d6\u308a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u307e\u3041\u3001\u76ee\u6a19\u306f\u9054\u305b\u3066\u3044\u308b\u3068\u3044\u3046\u6271\u3044\u306b\u3057\u307e\u3059\u3002....<\/p>\n<pre><code>root@localhost ~# openssl req -new -x509 -days 365 -nodes -out \/etc\/nginx\/cert\/nextcloud.crt -keyout \/etc\/nginx\/cert\/nextcloud.key  \n\nroot@localhost ~# chmod 700 \/etc\/nginx\/cert  \nroot@localhost ~# chmod 600 \/etc\/nginx\/cert\/*  \n#\u3053\u3053\u3067\u3001\u4e0a\u8a18\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002  \n<\/code><\/pre>\n<p>\u6b21\u306b\u3001nginx \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306b\u6240\u6709\u3057\u3066\u3044\u308b\u30c6\u30b9\u30c8\u7528\u306ehtml\u3092\u524a\u9664\u3057\u3066\u3044\u304d\u307e\u3059\u3002  <\/p>\n<pre><code>root@localhost ~# rm -rf \/usr\/share\/nginx\/html\/index.html  \nroot@localhost ~# rm -rf \/usr\/share\/nginx\/html\/50x.html  \n\n\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u3066\u304a\u304d\u307e\u3059\u3002  <\/code><\/pre>\n<p>\u305d\u308c\u3067\u306f\u3001\u3053\u3053\u3089\u3067nginx \u306e conf\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u3066\u304a\u304d\u307e\u3059\u3002  <\/p>\n<pre><code>root@localhost ~# nginx -t  \nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok  \nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful  \n ```\n\n \u3053\u306e\u3088\u3046\u306b\u3001\u8868\u793a\u3055\u308c\u3066\u3044\u308c\u3070\u5927\u4e08\u592b\u3067\u3059\u3002  \n \u6b21\u306b\u3001nginx \u3067php-fpm.sock \u3068\u3044\u3046\u3082\u306e\u3092\u4f7f\u3063\u3066\u901a\u4fe1\u3059\u308b\u306e\u3067\u3059\u304c \u305d\u306e\u70ba\u306b php-fpm.sock\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u5fc5\u8981\u306a\u306e\u3067\u3053\u308c\u306b\u4fc2\u308b\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002  \n\n ```\n root@localhost ~# vi \/etc\/php-fpm.d\/www.conf  \n\n user = apache \u2190 nginx \u306b\u5909\u66f4 \n; RPM: Keep a group allowed to write in log dir.  \ngroup = apache  \u2190 nginx \u306b\u5909\u66f4  \n\n\u305d\u306e\u307e\u307e\u884c\u3092\u4e0b\u306e\u65b9\u306b\u305a\u3089\u3057\u3066\u3044\u304f\u3068....  \n\nlisten = \/var\/run\/php-fpm\/php-fpm.sock  \n\u3053\u3053\u3082\u3042\u308a\u307e\u3059\u3002  \n\u6700\u521d\u306f\u3001 ;listen = \/var....  \n\u3068\u306a\u3063\u3066\u308b\u306f\u305a\u306a\u306e\u3067\u3001 ; \u3092\u6d88\u3057\u3061\u3083\u3063\u3066\u304f\u3060\u3055\u3044\u3002  \n\n\u3055\u3089\u306b\u5c11\u3057\u4e0b\u306b....  \nlisten.owner = nobody \u2190nobody\u3092nginx\u306b\u5909\u66f4  \nlisten.group = nobody \u2190nobody\u3092nginx\u306b\u5909\u66f4  \n<\/code><\/pre>\n<p>\u305d\u308c\u3067\u306f\u3001\u3053\u306e\u8fba\u3067\u3044\u3063\u305f\u3093\u30b5\u30fc\u30d0\u30fc\u81ea\u4f53\u306e\u518d\u8d77\u52d5\u3092\u304b\u3051\u3066\u304a\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002  <\/p>\n<pre><code>\n root@localhost ~# reboot  \n<\/code><\/pre>\n<p>&lt;br&gt;<br \/>\n\u305d\u308c\u3067\u306f\u3001\u6b21\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e1\u30a4\u30f3\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u5404\u7a2e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306b\u3001\u3000\u3000<br \/>\nsystemctl enable mariadb \u3068\u6253\u3063\u305f\u3068\u601d\u3044\u307e\u3059\u304c<br \/>\n\u5ff5\u306e\u305f\u3081\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304a\u304d\u307e\u3059\u3002  <\/p>\n<pre><code>root@localhost ~# systemctl start mariadb  \n\nroot@localhost ~# mysql -u root\u3000\u3000\n\u3053\u3053\u304b\u3089\u5148\u306f\u3001 mysql \u5185\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306b\u306a\u308b \u2193  \n\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 8\nServer version: 10.4.6-MariaDB MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<\/code><\/pre>\n<p>```SQL<br \/>\nMariaDB [(none)]&gt; create database nextcloud_db;  <\/p>\n<p>MariaDB [(none)]&gt; create user nextcloud@localhost identified by &#039;password&#039;;  <\/p>\n<pre><code>\n>nextcloud@localhost\u306e\u90e8\u5206\u3067\u3059\u304c\u3001\n>>\u30e6\u30fc\u30b6\u30fc\u306f\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u63a5\u7d9a\u3092\u884c\u3046\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30db\u30b9\u30c8\u540d\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\u6307\u5b9a\u3057\u305f\u30db\u30b9\u30c8\u304b\u3089\u6307\u5b9a\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u5834\u5408\u3060\u3051\u63a5\u7d9a\u3092\u884c\u3048\u307e\u3059\u3002\n\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30db\u30b9\u30c8\u540d\u306f\u7279\u5225\u306a\u6587\u5b57(\u4f8b\u3048\u3070 @ \u306a\u3069)\u3092\u542b\u307e\u306a\u3044\u9650\u308a\u306f\u5f15\u7528\u7b26\u3067\u56f2\u3046\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u7279\u5225\u306a\u6587\u5b57\u3092\u542b\u3080\u5834\u5408\u3084\u30db\u30b9\u30c8\u540d\u306b\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u9006\u5f15\u7528\u7b26( ` ) \u3001\u30b7\u30f3\u30b0\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3( ' )\u3001\u307e\u305f\u306f\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3( \" )\u3067\u56f2\u3063\u3066\u6307\u5b9a\u3057\u3066\u4e0b\u3055\u3044\u3002(\u5f15\u7528\u7b26\u3067\u56f2\u3080\u5834\u5408\u306f\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30db\u30b9\u30c8\u540d\u306f\u5225\u3005\u306b\u56f2\u3063\u3066\u4e0b\u3055\u3044)\u3002 (https:\/\/www.dbonline.jp\/mysql\/user\/index1.html \u3088\u308a)  \n\n\u3068\u3044\u3046\u3053\u3068\u307f\u305f\u3044\u3067\u3059\u3002  \n\u4eca\u307e\u3067\u3001\u304a\u307e\u3058\u306a\u3044\u7684\u306b\u4f55\u3082\u8003\u3048\u305a\u6253\u3063\u3066\u3044\u305f\u306e\u3067\u3053\u3053\u3067\u52c9\u5f37\u306b\u306a\u308b\u3068\u306f\u601d\u3044\u307e\u305b\u3093\u3067\u3057\u305f(\u7b11)  \n\n<br>  \n\u7d9a\u304d\u3067\u3059...  \n```SQL\nMariaDB [(none)]&gt; grant all privileges on nextcloud_db.* to nextcloud@localhost identified by &#039;password&#039;;  \n\nMariaDB [(none)]&gt; create database wordpress;\nMariaDB [(none)]&gt; grant all privileges on wordpress.* to wp_user@localhost identified by &#039;password&#039;;  \n<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001\u3072\u3068\u307e\u305a\u306f\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u69cb\u7bc9\u304c\u51fa\u6765\u307e\u3057\u305f\u3002<br \/>\n\u3044\u3088\u3044\u3088\u3001wordpress \u3068 nextcloud\u306e\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u3042\u3068\u306f\u8a2d\u7f6e\u3059\u308b\u3060\u3051\u3068\u306a\u308a\u307e\u3057\u305f\u3002!!  <\/p>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u9811\u5f35\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046!  <\/p>\n<pre><code>root@localhost ~# wget wget https:\/\/download.nextcloud.com\/server\/releases\/nextcloud-xx.x.x.tar.bz2  \n\nroot@localhost ~# wget https:\/\/ja.wordpress.org\/latest-ja.tar.gz  \n\n\u3053\u3053\u304b\u3089\u3001\u305d\u308c\u305e\u308c\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u51cd\u3057\u3066\u3044\u304f\u3002  \n\nroot@localhost ~# tar jxvf xx.x.x.tar.bz2  \n\nroot@localhost ~# tar xzvf latest-ja.tar.gz  \n\n\u3053\u308c\u3089\u3092\u5c55\u958b\u3059\u308b\u3068\u3001\u3068\u308a\u3042\u3048\u305a\u5727\u7e2e\u3055\u308c\u3066\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u30c9\u30d0\u30a1\u30fc\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002(\u3053\u306e\u6642\u70b9\u3067\u89e3\u51cd\u6e08\u307f)  \n<\/code><\/pre>\n<p>\u3053\u3053\u304b\u3089\u306f\u3001\u5c55\u958b\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u3092\u9069\u5207\u306a\u4f4d\u7f6e\u3078\u7f6e\u3044\u3066\u3044\u304d\u307e\u3059\u3002  <\/p>\n<pre><code>root@localhost ~# mv \/root\/wordpress\/ \/usr\/share\/nginx\/html\/  \nroot@localhost ~# mv \/root\/nextcloud\/ \/usr\/share\/nginx\/html\/  \n\n\u3053\u3053\u3067nextcloud \u3068 wordpress \u306e\u30d5\u30a9\u30eb\u30c0\u305d\u308c\u305e\u308c\u306b\u6240\u6709\u8005\u5909\u66f4\u3068\u6a29\u9650\u5909\u66f4\u3092\u884c\u3044\u307e\u3059\u3002  \n\nroot@ocalhost ~# chown nginx:nginx \/usr\/share\/nginx\/html\/nextcloud\/ -R  \n\nroot@localhost ~# chown nginx:nginx \/usr\/share\/nginx\/html\/wordpress\/ -R  \n<\/code><\/pre>\n<p>\u4ee5\u4e0a\u3067\u3001\u4f5c\u696d\u306f\u7d42\u4e86\u3067\u3059\u3002<br \/>\n\u3042\u3001\u66f8\u304d\u5fd8\u308c\u3066\u307e\u3057\u305f\u304c test.labo\u306a\u3069\u306e\u30c9\u30e1\u30a4\u30f3\u540d\u3067\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306fwindows , mac \u306a\u3069\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8PC\u306ehosts\u306b\u660e\u8a18\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n\u5834\u6240\u306f\u3001\u3053\u3061\u3089\u306b\u306a\u308a\u307e\u3059\u3002  <\/p>\n<pre><code>C:\\Windows\\System32\\drivers\\etc\\hosts  <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/62025365-7d482880-b1c7-11e9-9fa0-1bc8f2b6491e.png\" alt=\"image\" \/>  <\/p>\n<p>\u6700\u4e0b\u6bb5\u306b\u304d\u3055\u3044\u3057\u3066\u3042\u308btest.labo\u306e\u901a\u308aIP\u30a2\u30c9\u30ec\u30b9\u3068\u4efb\u610f\u306b\u8a2d\u5b9a\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u7d10\u3065\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3060\u3051\u3001\u7559\u610f\u3057\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u5927\u4e08\u592b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\n\u305d\u308c\u3067\u306f\u3001\u697d\u3057\u3044\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30af\u30e9\u30a6\u30c9\u30e9\u30a4\u30d5\u3092!!  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7686\u3055\u3093\u3001\u3053\u3093\u3061\u308f \u76f8\u5909\u308f\u3089\u305a\u306e\u30d4\u30f3\u6751\u3067\u3054\u3056\u3044\u307e\u3059\u3002 \u5f0a\u30b5\u30fc\u30af\u30eb\u306b\u306f\u5c02\u6709\u30b5\u30fc\u30d0\u30fc\u3064\u307e\u308a\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u306e\u30b5\u30fc\u30d0\u30fc\u304c\u3054\u3056\u3044\u307e\u305b\u3093\u3002(IT\u7cfb\u30b5\u30fc\u30af\u30eb\u306a\u306e\u306b) \u305d\u3053\u3067\u3001\u3053\u3053\u6700\u8fd1\u30d6\u30ec\u30fc\u30c9\u30b5\u30fc\u30d0\u30fc\u3067\u3082\u8cb7\u3063\u3066\u5f0a\u30b5\u30fc\u30af\u30eb\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u74b0\u5883\uff0b&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/blog.yukiafronia.com\/?p=73\" class=\"more-link read-more\" rel=\"bookmark\"><span class=\"screen-reader-text\">\u30aa\u30f3\u30e9\u30a4\u30f3\u30b9\u30c8\u30ec\u30fc\u30b8\u30b7\u30b9\u30c6\u30e0 Nextcloud\u74b0\u5883 \u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u6271\u3044\u3067\u5efa\u3066\u3066\u307f\u305f!<\/span><i class=\"fa fa-arrow-right\"><\/i> \u306e\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":74,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-73","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=73"}],"version-history":[{"count":1,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions\/75"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/media\/74"}],"wp:attachment":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}