Site updated: 2022-10-20 09:47:16
This commit is contained in:
25
feed.json
25
feed.json
@ -6,6 +6,21 @@
|
||||
"description": "hito的博客",
|
||||
"home_page_url": "https://blog.jingxiyuan.cn",
|
||||
"items": [
|
||||
{
|
||||
"id": "https://blog.jingxiyuan.cn/2022/10/20/%E6%9E%81%E7%A9%BA%E9%97%B4Docker%E7%89%88Wordpress%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/",
|
||||
"url": "https://blog.jingxiyuan.cn/2022/10/20/%E6%9E%81%E7%A9%BA%E9%97%B4Docker%E7%89%88Wordpress%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/",
|
||||
"title": "极空间Docker版Wordpress安装与配置",
|
||||
"date_published": "2022-10-20T00:56:00.000Z",
|
||||
"content_html": "<h4 id=\"安装\"><a class=\"anchor\" href=\"#安装\">#</a> 安装</h4>\n<ul>\n<li>下载最新版 wordpress 镜像,如极空间无法下载,可到<span class=\"exturl\" data-url=\"aHR0cHM6Ly9wdWxsaW1hZ2UucGFzc2VybWEuY29tLw==\"> passerma 网站</span>下载。</li>\n<li>需要先在 mysql 中创建给 wordpress 使用的库。</li>\n<li>文件路径映射(目前极空间不能映射到高速盘,否则无法启动)。<br />\n<img data-src=\"https://file.jingxiyuan.cn/images/2022/10/20/2022-10-20-08-58-31.png\" alt=\"\" /></li>\n<li>端口映射。<br />\n<img data-src=\"https://file.jingxiyuan.cn/images/2022/10/20/2022-10-20-08-58-56.png\" alt=\"\" /></li>\n<li>通过映射的端口访问安装界面(一定要通过最终访问的页面进行安装,否则修改配置比较麻烦。如最终是域名访问,就先把域名解析代理等先配置好,再通过域名访问安装)。</li>\n</ul>\n<h4 id=\"配置\"><a class=\"anchor\" href=\"#配置\">#</a> 配置</h4>\n<ul>\n<li>如需使用 https 访问,需要在 wp-config.php 中加入以下代码,否则资源文件无法访问。</li>\n</ul>\n<pre><code class=\"language-php\">if((!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) || (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) {\n $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];\n $_SERVER['HTTPS'] = 'on';\n}\n</code></pre>\n<ul>\n<li>后台安装插件时如果跳转到 ftp 配置,则需要在 wp-config.php 中加入以下代码,并到 wp-content 目录下创建 tmp 目录,最后还需要给 tmp 目录赋予读写权限。</li>\n</ul>\n<pre><code class=\"language-php\">define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');\ndefine('FS_METHOD', 'direct');\ndefine('FS_CHMOD_DIR', 0777);\ndefine('FS_CHMOD_FILE', 0777);\n</code></pre>\n<ul>\n<li>目录和文件所有者、组会自动变为 root,目前我是通过访问页面时通过命令修正。暂时未发现问题,如果不行则只能通过定时任务来定时修正了。需要在 wp-config.php 中加入以下代码。</li>\n</ul>\n<pre><code class=\"language-php\">chown('/var/www/html', 'www-data');\nchgrp('/var/www/html', 'www-data');\nchmod('/var/www/html/wp-content/plugins', 0777);\nchmod('/var/www/html/wp-content/themes', 0777);\nchmod('/var/www/html/wp-content/tmp', 0777);\n</code></pre>\n<ul>\n<li>隐藏后台访问需要在 wp-login.php 中加入以下代码,key、value 和 https://www.xxx.com/ 需要修改为自己的。修改后只能通过 https://www.xxx.com/wp-login.php?key=value 访问,其它访问需要登录的页面都会跳转到配置的 https://www.xxx.com/ 地址。</li>\n</ul>\n<pre><code class=\"language-php\">if($_GET['key'] != 'value') {\n\theader('Location: https://www.xxx.com/');\n}\n</code></pre>\n",
|
||||
"tags": [
|
||||
"极空间",
|
||||
"Docker",
|
||||
"Wordpress",
|
||||
"博客",
|
||||
"极空间",
|
||||
"Wordpress"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "https://blog.jingxiyuan.cn/2022/10/19/%E9%95%BF%E4%BA%86%E4%B8%80%E5%B2%81/",
|
||||
"url": "https://blog.jingxiyuan.cn/2022/10/19/%E9%95%BF%E4%BA%86%E4%B8%80%E5%B2%81/",
|
||||
@ -70,8 +85,8 @@
|
||||
"Windows",
|
||||
"工具",
|
||||
"经验分享",
|
||||
"PicGo",
|
||||
"chevereto"
|
||||
"chevereto",
|
||||
"PicGo"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -211,11 +226,11 @@
|
||||
"极空间",
|
||||
"Docker",
|
||||
"技术分享",
|
||||
"chevereto",
|
||||
"docker",
|
||||
"极空间",
|
||||
"docker",
|
||||
"图床",
|
||||
"图片上传"
|
||||
"图片上传",
|
||||
"chevereto"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user