{"id":73,"date":"2021-10-06T12:00:05","date_gmt":"2021-10-06T03:00:05","guid":{"rendered":"http:\/\/fr.tsbio.info\/labo\/suzuki\/?p=73"},"modified":"2021-10-08T12:26:13","modified_gmt":"2021-10-08T03:26:13","slug":"post-73","status":"publish","type":"post","link":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/archives\/73","title":{"rendered":"WordPress\u3092\u4e8c\u3064\u52d5\u304b\u3059"},"content":{"rendered":"<p>\/ \u3068 \/labo\/suzuki \u3067\u4e8c\u3064\u306eWordPress\u3092\u52d5\u304b\u3059\u3002<\/p>\n<h3>docker\u30b3\u30f3\u30c6\u30ca\u3092\u7528\u610f\u3059\u308b<\/h3>\n<p><a href=\"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/archives\/5\">Docker\u3092\u4f7f\u3063\u3066WordPress\u306e\u52d5\u304f\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b<\/a>\u306b\u5f93\u3063\u3066\u3001\u4e8c\u7d44\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u7acb\u3061\u4e0a\u3052\u308b\u3002<br \/>\n\u4ee5\u5f8c\/\u3067\u52d5\u304b\u3057\u305f\u3044\u307b\u3046\u3092wpa\u3001\/labo\/suzuki\u3067\u52d5\u304b\u3057\u305f\u3044\u307b\u3046\u3092wpb\u3068\u3059\u308b\u3002<\/p>\n<h3>apache\u306e\u8a2d\u5b9a<\/h3>\n<p>docker\u306e\u30db\u30b9\u30c8\u3067\u7a3c\u50cd\u3057\u3066\u3044\u308bapache\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3002<\/p>\n<h4>\/etc\/httpd\/conf.d\/wordpress.conf<\/h4>\n<pre>&lt;VirtualHost *:80&gt;\nServerName biochemistry.isc.chubu.ac.jp\nProxyPreserveHost On\nProxyPass \/ http:\/\/localhost:pa\/    # pa\u306fwpa\u306e\u7a3c\u50cd\u3059\u308b\u30dd\u30fc\u30c8\u756a\u53f7\nProxyPassReverse \/ http:\/\/localhost:pa\/    # \u4e0a\u3068\u540c\u3058\n\n&lt;Location \/labo\/suzuki&gt;\n    ProxyPass http:\/\/localhost:pb\/labo\/suzuki    # pb\u306fwpb\u306e\u7a3c\u50cd\u3059\u308b\u30dd\u30fc\u30c8\n    ProxyPassReverse http:\/\/localhost:pb\/labo\/suzuki    # \u4e0a\u3068\u540c\u3058\n&lt;\/Location&gt;\n&lt;\/VirtualHost&gt;\n<\/pre>\n<h3>WordPress\u306e\u8a2d\u5b9a<\/h3>\n<h4>wpa\u306e\u8a2d\u5b9a<\/h4>\n<p>\u666e\u901a\u306b http:\/\/biochemistry.isc.chubu.ac.jp\/ \u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>\u30b5\u30a4\u30c8\u30a2\u30c9\u30ec\u30b9\u306f http:\/\/biochemistry.isc.chubu.ac.jp \u306b\u3059\u308b\u3002<\/p>\n<h4>wpb\u306e\u8a2d\u5b9a<\/h4>\n<p>http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/ \u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>\u30b5\u30a4\u30c8\u30a2\u30c9\u30ec\u30b9\u306f http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki \u306b\u3059\u308b\u3002<\/p>\n<h4>.htaccess \u306e\u4fee\u6b63<\/h4>\n<p>wpb\u306eWordPress\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3068.htaccess\u304c\u81ea\u52d5\u3067\u66f4\u65b0\u3055\u308c\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\/labo\/suzuki \u4ee5\u4e0b\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3060\u3051\u3092index.php\u306b\u5411\u3051\u308b\u3088\u3046\u306bwpb\u306e.htaccess\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;IfModule mod_rewrite.c&gt;\nRewriteEngine On\nRewriteBase \/\nRewriteRule ^labo\/suzuki(.*) \/$1 [L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . \/index.php [L]\n&lt;\/IfModule&gt;\n<\/pre>\n<p>.htaccess\u3092\u4e0d\u610f\u306bWordPress\u304c\u5909\u66f4\u3057\u306a\u3044\u3088\u3046\u306b\u3001\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u5909\u3048\u3066\u304a\u304f\u3068\u3044\u3044\u3067\u3059\u3002<\/p>\n<h3>\u5931\u6557\u3057\u305f\u3068\u304d\u306e\u5bfe\u51e6\u6cd5<\/h3>\n<p>WordPress\u306e\u30b5\u30a4\u30c8\u30a2\u30c9\u30ec\u30b9\u3084WordPress\u30a2\u30c9\u30ec\u30b9\u3092\u9593\u9055\u3048\u308b\u3068\u3001\u8a2d\u5b9a\u753b\u9762\u306b\u305f\u3069\u308a\u7740\u3051\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3057\u3066\u3001\u76f4\u63a5\u5024\u3092\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre># mysql -u root -p # -- mysql\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30ed\u30b0\u30a4\u30f3\nEnter password: (\u30b3\u30f3\u30c6\u30ca\u4f5c\u6210\u6642\u306bMYSQL_ROOT_PASSWORD\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b)\nmysql&gt; show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| sys                |\n| wordpress          |  # &lt;-- \u3053\u308c\u304cwordPress\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3002WordPress\u306e\u8a2d\u5b9a\u6642\u306b\u5909\u66f4\u3057\u3066\u3044\u308b\u304b\u3082\n+--------------------+\n\nmysql&gt; connect wordpress; # -- \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u63a5\u7d9a\n\nmysql&gt; show tables;  # -- \u30c6\u30fc\u30d6\u30eb\u4e00\u89a7\n+-----------------------+\n| Tables_in_wordpress   |\n+-----------------------+\n| wp_commentmeta        |\n| wp_comments           |\n| wp_links              |\n| wp_options            |\n| wp_postmeta           |\n| wp_posts              |\n| wp_term_relationships |\n| wp_term_taxonomy      |\n| wp_termmeta           |\n| wp_terms              |\n| wp_usermeta           |\n| wp_users              |\n+-----------------------+\n12 rows in set (0.00 sec)\n\nmysql&gt; desc wp_options;  # -- \u30c6\u30fc\u30d6\u30eb\u306e\u8a73\u7d30\n+--------------+---------------------+------+-----+---------+----------------+\n| Field        | Type                | Null | Key | Default | Extra          |\n+--------------+---------------------+------+-----+---------+----------------+\n| option_id    | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |\n| option_name  | varchar(191)        | NO   | UNI |         |                |\n| option_value | longtext            | NO   |     | NULL    |                |\n| autoload     | varchar(20)         | NO   |     | yes     |                |\n+--------------+---------------------+------+-----+---------+----------------+\n4 rows in set (0.01 sec)\n\nmysql&gt; select * from wp_options where option_name in ('siteurl', 'home');\n+-----------+-------------+-----------------------------+----------+\n| option_id | option_name | option_value                | autoload |\n+-----------+-------------+-----------------------------+----------+\n|         2 | home        | http:\/\/www.example.com:8000 | yes      |  # -- WordPress\u3092\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u306b\u958b\u3044\u305fURL\n|         1 | siteurl     | http:\/\/www.example.com:8000 | yes      |\n+-----------+-------------+-----------------------------+----------+\n\nmysql&gt; update wp_options set option_value = 'http:\/\/main.example.com' where option_id in (1, 2);\n\nmysql&gt; exit  # -- mysql\u3092\u7d42\u4e86\u3059\u308b\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/ \u3068 \/labo\/suzuki \u3067\u4e8c\u3064\u306eWordPress\u3092\u52d5\u304b\u3059\u3002 docker\u30b3\u30f3\u30c6\u30ca\u3092\u7528\u610f\u3059\u308b Docker\u3092\u4f7f\u3063\u3066WordPress\u306e\u52d5\u304f\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b\u306b\u5f93\u3063\u3066\u3001\u4e8c\u7d44\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u7acb\u3061\u4e0a\u3052\u308b\u3002 \u4ee5\u5f8c\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts\/73"}],"collection":[{"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":32,"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":526,"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/posts\/73\/revisions\/526"}],"wp:attachment":[{"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/biochemistry.isc.chubu.ac.jp\/labo\/suzuki\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}