{"id":268,"date":"2025-11-29T20:02:13","date_gmt":"2025-11-29T11:02:13","guid":{"rendered":"http:\/\/www.sakanashi.mydns.jp\/wprss\/?p=268"},"modified":"2025-12-27T16:29:05","modified_gmt":"2025-12-27T07:29:05","slug":"post-268","status":"publish","type":"post","link":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/2025\/11\/29\/post-268\/","title":{"rendered":"\u5404\u7a2e\u30b5\u30fc\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb2"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Apache+WordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u65e7\u30b5\u30fc\u30d0\u30fc\u3067\u306f\u57fa\u672c\u7684\u306bHTML\u3067\u8a18\u8ff0\u3057\u305f\u30da\u30fc\u30b8+\u63b2\u793a\u677fCGI\u7b49\u3067Web\u30da\u30fc\u30b8\u3092\u904b\u55b6\u3057\u3066\u304d\u305f\u304c\u3001\u4eca\u56de\u3001\u74b0\u5883\u3092\u4e00\u65b0\u3057\u3066WordPress\u74b0\u5883\u3067\u306e\u904b\u7528\u3092\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002Apache\u3068WordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff06\u8a2d\u5b9a\u624b\u9806\u3092\u4ee5\u4e0b\u306b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30b7\u30b9\u30c6\u30e0\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">apt update\napt upgrade -y<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apache\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">apt install apache2 -y<\/code><\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">ufw allow www<\/code><\/pre>\n\n\n\n<p>\u3067\u30dd\u30fc\u30c8\u3092\u958b\u3051\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MySQL\u3068PHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">apt install mysql-server -y\napt install php libapache2-mod-php php-mysql -y<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MySQL\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a2d\u5b9a\u3092\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">mysql_secure_installation<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress\u7528\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30e6\u30fc\u30b6\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">mysql -u root -p <\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MySQL\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u4ee5\u4e0b\u306esql\u3092\u5b9f\u884c<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-plsql\"><code class=\"language-plsql\">CREATE DATABASE wordpress;\nCREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'your_password';\nGRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';\nFLUSH PRIVILEGES;\nEXIT;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">cd \/tmp\nwget https:\/\/wordpress.org\/latest.tar.gz\ntar -xvzf latest.tar.gz\nmv wordpress \/home\/share\/web-root\/html\/wprss<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u8a2d\u5b9a\u3092\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">chown -R www-data:www-data \/home\/share\/web-root\/html\/wprss\nchmod -R 755 \/home\/share\/web-root\/html\/wprss<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">cd \/home\/share\/web-root\/html\/wprss\ncp wp-config-sample.php wp-config.php<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>wp-config.php\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3001\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u60c5\u5831\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-apacheconf\"><code class=\"language-apacheconf\">define('DB_NAME', 'wordpress');\ndefine('DB_USER', 'wordpressuser');\ndefine('DB_PASSWORD', 'your_password');\ndefine('DB_HOST', 'localhost');<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apache\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">vi \/etc\/apache2\/sites-available\/wordpress.conf<\/code><\/pre>\n\n\n\n<p>\u3067\u4ee5\u4e0b\u3092\u8a18\u8ff0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-apacheconf\"><code class=\"language-apacheconf\">&lt;VirtualHost *:80>\n  ServerAdmin webmaster@localhost\n  DocumentRoot \/home\/share\/web-root\/html\/wprss\n  ErrorLog ${APACHE_LOG_DIR}\/error.log\n  CustomLog ${APACHE_LOG_DIR}\/access.log combined\n\n  &lt;Directory \/home\/share\/web-root\/html\/wprss\/>\n      Options Indexes FollowSymLinks\n      AllowOverride All\n      Require all granted\n  &lt;\/Directory>\n&lt;\/VirtualHost><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30b5\u30a4\u30c8\u3092\u6709\u52b9\u5316\u3057\u3001Apache\u3092\u518d\u8d77\u52d5\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">a2ensite wordpress.conf\na2enmod rewrite\nsystemctl restart apache2<\/code><\/pre>\n\n\n\n<p>Win11\u30de\u30b7\u30f3\u3067\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u304d\u3001http:\/\/server_ip\/wprss \u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u753b\u9762\u306e\u6307\u793a\u306b\u5f93\u3063\u3066WordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b8c\u4e86\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache+WordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u65e7\u30b5\u30fc\u30d0\u30fc\u3067\u306f\u57fa\u672c\u7684\u306bHTML\u3067\u8a18\u8ff0\u3057\u305f\u30da\u30fc\u30b8+\u63b2\u793a\u677fCGI\u7b49\u3067Web\u30da\u30fc\u30b8\u3092\u904b\u55b6\u3057\u3066\u304d\u305f\u304c\u3001\u4eca\u56de\u3001\u74b0\u5883\u3092\u4e00\u65b0\u3057\u3066WordPress\u74b0\u5883\u3067\u306e\u904b\u7528\u3092\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002Apach [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,21],"tags":[],"class_list":["post-268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pc_server","category-others"],"_links":{"self":[{"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":3,"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":289,"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions\/289"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/media\/526"}],"wp:attachment":[{"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sakanashi.mydns.jp\/wprss\/index.php\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}