Site updated: 2022-10-20 09:47:16
This commit is contained in:
parent
6e3e5e33e2
commit
5eda15ed46
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
17
2022/10/20/极空间Docker版Wordpress安装与配置/index.html
Normal file
17
2022/10/20/极空间Docker版Wordpress安装与配置/index.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
64
atom.xml
64
atom.xml
@ -8,7 +8,7 @@
|
|||||||
<author>
|
<author>
|
||||||
<name>Hito li</name>
|
<name>Hito li</name>
|
||||||
</author>
|
</author>
|
||||||
<updated>2022-10-19T00:51:00.000Z</updated>
|
<updated>2022-10-20T00:56:00.000Z</updated>
|
||||||
<category term="hito" />
|
<category term="hito" />
|
||||||
<category term="無言" />
|
<category term="無言" />
|
||||||
<category term="博客" />
|
<category term="博客" />
|
||||||
@ -16,6 +16,62 @@
|
|||||||
<category term="笔记" />
|
<category term="笔记" />
|
||||||
<category term="心得体会" />
|
<category term="心得体会" />
|
||||||
<category term="踩坑" />
|
<category term="踩坑" />
|
||||||
|
<entry>
|
||||||
|
<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/</id>
|
||||||
|
<title>极空间Docker版Wordpress安装与配置</title>
|
||||||
|
<link rel="alternate" href="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/"/>
|
||||||
|
<content type="html"><h4 id="安装"><a class="anchor" href="#安装">#</a> 安装</h4>
|
||||||
|
<ul>
|
||||||
|
<li>下载最新版 wordpress 镜像,如极空间无法下载,可到<span class="exturl" data-url="aHR0cHM6Ly9wdWxsaW1hZ2UucGFzc2VybWEuY29tLw=="> passerma 网站</span>下载。</li>
|
||||||
|
<li>需要先在 mysql 中创建给 wordpress 使用的库。</li>
|
||||||
|
<li>文件路径映射(目前极空间不能映射到高速盘,否则无法启动)。<br />
|
||||||
|
<img data-src="https://file.jingxiyuan.cn/images/2022/10/20/2022-10-20-08-58-31.png" alt="" /></li>
|
||||||
|
<li>端口映射。<br />
|
||||||
|
<img data-src="https://file.jingxiyuan.cn/images/2022/10/20/2022-10-20-08-58-56.png" alt="" /></li>
|
||||||
|
<li>通过映射的端口访问安装界面(一定要通过最终访问的页面进行安装,否则修改配置比较麻烦。如最终是域名访问,就先把域名解析代理等先配置好,再通过域名访问安装)。</li>
|
||||||
|
</ul>
|
||||||
|
<h4 id="配置"><a class="anchor" href="#配置">#</a> 配置</h4>
|
||||||
|
<ul>
|
||||||
|
<li>如需使用 https 访问,需要在 wp-config.php 中加入以下代码,否则资源文件无法访问。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">if((!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) || (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) &#123;
|
||||||
|
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
|
||||||
|
$_SERVER['HTTPS'] = 'on';
|
||||||
|
&#125;
|
||||||
|
</code></pre>
|
||||||
|
<ul>
|
||||||
|
<li>后台安装插件时如果跳转到 ftp 配置,则需要在 wp-config.php 中加入以下代码,并到 wp-content 目录下创建 tmp 目录,最后还需要给 tmp 目录赋予读写权限。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');
|
||||||
|
define('FS_METHOD', 'direct');
|
||||||
|
define('FS_CHMOD_DIR', 0777);
|
||||||
|
define('FS_CHMOD_FILE', 0777);
|
||||||
|
</code></pre>
|
||||||
|
<ul>
|
||||||
|
<li>目录和文件所有者、组会自动变为 root,目前我是通过访问页面时通过命令修正。暂时未发现问题,如果不行则只能通过定时任务来定时修正了。需要在 wp-config.php 中加入以下代码。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">chown('/var/www/html', 'www-data');
|
||||||
|
chgrp('/var/www/html', 'www-data');
|
||||||
|
chmod('/var/www/html/wp-content/plugins', 0777);
|
||||||
|
chmod('/var/www/html/wp-content/themes', 0777);
|
||||||
|
chmod('/var/www/html/wp-content/tmp', 0777);
|
||||||
|
</code></pre>
|
||||||
|
<ul>
|
||||||
|
<li>隐藏后台访问需要在 wp-login.php 中加入以下代码,key、value 和 https://www.xxx.com/ 需要修改为自己的。修改后只能通过 https://www.xxx.com/wp-login.php?key=value 访问,其它访问需要登录的页面都会跳转到配置的 https://www.xxx.com/ 地址。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">if($_GET['key'] != 'value') &#123;
|
||||||
|
header('Location: https://www.xxx.com/');
|
||||||
|
&#125;
|
||||||
|
</code></pre>
|
||||||
|
</content>
|
||||||
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
|
<category term="Docker" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" />
|
||||||
|
<category term="Wordpress" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/Wordpress/" />
|
||||||
|
<category term="博客" scheme="https://blog.jingxiyuan.cn/tags/%E5%8D%9A%E5%AE%A2/" />
|
||||||
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/tags/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
|
<category term="Wordpress" scheme="https://blog.jingxiyuan.cn/tags/Wordpress/" />
|
||||||
|
<updated>2022-10-20T00:56:00.000Z</updated>
|
||||||
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<id>https://blog.jingxiyuan.cn/2022/10/19/%E9%95%BF%E4%BA%86%E4%B8%80%E5%B2%81/</id>
|
<id>https://blog.jingxiyuan.cn/2022/10/19/%E9%95%BF%E4%BA%86%E4%B8%80%E5%B2%81/</id>
|
||||||
<title>又长了一岁</title>
|
<title>又长了一岁</title>
|
||||||
@ -450,8 +506,8 @@ url 后缀必须用红线圈中的部分,key 在 chevereto 登陆后 api 配
|
|||||||
<category term="Windows" scheme="https://blog.jingxiyuan.cn/categories/Windows/" />
|
<category term="Windows" scheme="https://blog.jingxiyuan.cn/categories/Windows/" />
|
||||||
<category term="工具" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/" />
|
<category term="工具" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/" />
|
||||||
<category term="经验分享" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/%E7%BB%8F%E9%AA%8C%E5%88%86%E4%BA%AB/" />
|
<category term="经验分享" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/%E7%BB%8F%E9%AA%8C%E5%88%86%E4%BA%AB/" />
|
||||||
<category term="PicGo" scheme="https://blog.jingxiyuan.cn/tags/PicGo/" />
|
|
||||||
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
||||||
|
<category term="PicGo" scheme="https://blog.jingxiyuan.cn/tags/PicGo/" />
|
||||||
<updated>2022-10-12T06:40:00.000Z</updated>
|
<updated>2022-10-12T06:40:00.000Z</updated>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
@ -833,11 +889,11 @@ server &#123;
|
|||||||
<category term="极空间" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
<category term="Docker" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" />
|
<category term="Docker" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" />
|
||||||
<category term="技术分享" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" />
|
<category term="技术分享" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" />
|
||||||
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
|
||||||
<category term="docker" scheme="https://blog.jingxiyuan.cn/tags/docker/" />
|
|
||||||
<category term="极空间" scheme="https://blog.jingxiyuan.cn/tags/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/tags/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
|
<category term="docker" scheme="https://blog.jingxiyuan.cn/tags/docker/" />
|
||||||
<category term="图床" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E5%BA%8A/" />
|
<category term="图床" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E5%BA%8A/" />
|
||||||
<category term="图片上传" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E7%89%87%E4%B8%8A%E4%BC%A0/" />
|
<category term="图片上传" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E7%89%87%E4%B8%8A%E4%BC%A0/" />
|
||||||
|
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
||||||
<updated>2022-09-16T00:04:00.000Z</updated>
|
<updated>2022-09-16T00:04:00.000Z</updated>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
categories/极空间/Docker/Wordpress/index.html
Normal file
1
categories/极空间/Docker/Wordpress/index.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
25
feed.json
25
feed.json
@ -6,6 +6,21 @@
|
|||||||
"description": "hito的博客",
|
"description": "hito的博客",
|
||||||
"home_page_url": "https://blog.jingxiyuan.cn",
|
"home_page_url": "https://blog.jingxiyuan.cn",
|
||||||
"items": [
|
"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/",
|
"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/",
|
"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",
|
"Windows",
|
||||||
"工具",
|
"工具",
|
||||||
"经验分享",
|
"经验分享",
|
||||||
"PicGo",
|
"chevereto",
|
||||||
"chevereto"
|
"PicGo"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -211,11 +226,11 @@
|
|||||||
"极空间",
|
"极空间",
|
||||||
"Docker",
|
"Docker",
|
||||||
"技术分享",
|
"技术分享",
|
||||||
"chevereto",
|
|
||||||
"docker",
|
|
||||||
"极空间",
|
"极空间",
|
||||||
|
"docker",
|
||||||
"图床",
|
"图床",
|
||||||
"图片上传"
|
"图片上传",
|
||||||
|
"chevereto"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
66
rss.xml
66
rss.xml
@ -10,8 +10,8 @@
|
|||||||
</author>
|
</author>
|
||||||
<description>hito的博客</description>
|
<description>hito的博客</description>
|
||||||
<language>zh-CN</language>
|
<language>zh-CN</language>
|
||||||
<pubDate>Wed, 19 Oct 2022 08:51:00 +0800</pubDate>
|
<pubDate>Thu, 20 Oct 2022 08:56:00 +0800</pubDate>
|
||||||
<lastBuildDate>Wed, 19 Oct 2022 08:51:00 +0800</lastBuildDate>
|
<lastBuildDate>Thu, 20 Oct 2022 08:56:00 +0800</lastBuildDate>
|
||||||
<category term="hito" />
|
<category term="hito" />
|
||||||
<category term="無言" />
|
<category term="無言" />
|
||||||
<category term="博客" />
|
<category term="博客" />
|
||||||
@ -19,6 +19,62 @@
|
|||||||
<category term="笔记" />
|
<category term="笔记" />
|
||||||
<category term="心得体会" />
|
<category term="心得体会" />
|
||||||
<category term="踩坑" />
|
<category term="踩坑" />
|
||||||
|
<item>
|
||||||
|
<guid isPermalink="true">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/</guid>
|
||||||
|
<title>极空间Docker版Wordpress安装与配置</title>
|
||||||
|
<link>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/</link>
|
||||||
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
|
<category term="Docker" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" />
|
||||||
|
<category term="Wordpress" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/Wordpress/" />
|
||||||
|
<category term="博客" scheme="https://blog.jingxiyuan.cn/tags/%E5%8D%9A%E5%AE%A2/" />
|
||||||
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/tags/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
|
<category term="Wordpress" scheme="https://blog.jingxiyuan.cn/tags/Wordpress/" />
|
||||||
|
<pubDate>Thu, 20 Oct 2022 08:56:00 +0800</pubDate>
|
||||||
|
<description><![CDATA[ <h4 id="安装"><a class="anchor" href="#安装">#</a> 安装</h4>
|
||||||
|
<ul>
|
||||||
|
<li>下载最新版 wordpress 镜像,如极空间无法下载,可到<span class="exturl" data-url="aHR0cHM6Ly9wdWxsaW1hZ2UucGFzc2VybWEuY29tLw=="> passerma 网站</span>下载。</li>
|
||||||
|
<li>需要先在 mysql 中创建给 wordpress 使用的库。</li>
|
||||||
|
<li>文件路径映射(目前极空间不能映射到高速盘,否则无法启动)。<br />
|
||||||
|
<img data-src="https://file.jingxiyuan.cn/images/2022/10/20/2022-10-20-08-58-31.png" alt="" /></li>
|
||||||
|
<li>端口映射。<br />
|
||||||
|
<img data-src="https://file.jingxiyuan.cn/images/2022/10/20/2022-10-20-08-58-56.png" alt="" /></li>
|
||||||
|
<li>通过映射的端口访问安装界面(一定要通过最终访问的页面进行安装,否则修改配置比较麻烦。如最终是域名访问,就先把域名解析代理等先配置好,再通过域名访问安装)。</li>
|
||||||
|
</ul>
|
||||||
|
<h4 id="配置"><a class="anchor" href="#配置">#</a> 配置</h4>
|
||||||
|
<ul>
|
||||||
|
<li>如需使用 https 访问,需要在 wp-config.php 中加入以下代码,否则资源文件无法访问。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">if((!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) || (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) &#123;
|
||||||
|
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
|
||||||
|
$_SERVER['HTTPS'] = 'on';
|
||||||
|
&#125;
|
||||||
|
</code></pre>
|
||||||
|
<ul>
|
||||||
|
<li>后台安装插件时如果跳转到 ftp 配置,则需要在 wp-config.php 中加入以下代码,并到 wp-content 目录下创建 tmp 目录,最后还需要给 tmp 目录赋予读写权限。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');
|
||||||
|
define('FS_METHOD', 'direct');
|
||||||
|
define('FS_CHMOD_DIR', 0777);
|
||||||
|
define('FS_CHMOD_FILE', 0777);
|
||||||
|
</code></pre>
|
||||||
|
<ul>
|
||||||
|
<li>目录和文件所有者、组会自动变为 root,目前我是通过访问页面时通过命令修正。暂时未发现问题,如果不行则只能通过定时任务来定时修正了。需要在 wp-config.php 中加入以下代码。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">chown('/var/www/html', 'www-data');
|
||||||
|
chgrp('/var/www/html', 'www-data');
|
||||||
|
chmod('/var/www/html/wp-content/plugins', 0777);
|
||||||
|
chmod('/var/www/html/wp-content/themes', 0777);
|
||||||
|
chmod('/var/www/html/wp-content/tmp', 0777);
|
||||||
|
</code></pre>
|
||||||
|
<ul>
|
||||||
|
<li>隐藏后台访问需要在 wp-login.php 中加入以下代码,key、value 和 https://www.xxx.com/ 需要修改为自己的。修改后只能通过 https://www.xxx.com/wp-login.php?key=value 访问,其它访问需要登录的页面都会跳转到配置的 https://www.xxx.com/ 地址。</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code class="language-php">if($_GET['key'] != 'value') &#123;
|
||||||
|
header('Location: https://www.xxx.com/');
|
||||||
|
&#125;
|
||||||
|
</code></pre>
|
||||||
|
]]></description>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/10/19/%E9%95%BF%E4%BA%86%E4%B8%80%E5%B2%81/</guid>
|
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/10/19/%E9%95%BF%E4%BA%86%E4%B8%80%E5%B2%81/</guid>
|
||||||
<title>又长了一岁</title>
|
<title>又长了一岁</title>
|
||||||
@ -437,8 +493,8 @@ sudo sysctl vm.overcommit_memory=1
|
|||||||
<category term="Windows" scheme="https://blog.jingxiyuan.cn/categories/Windows/" />
|
<category term="Windows" scheme="https://blog.jingxiyuan.cn/categories/Windows/" />
|
||||||
<category term="工具" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/" />
|
<category term="工具" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/" />
|
||||||
<category term="经验分享" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/%E7%BB%8F%E9%AA%8C%E5%88%86%E4%BA%AB/" />
|
<category term="经验分享" scheme="https://blog.jingxiyuan.cn/categories/Windows/%E5%B7%A5%E5%85%B7/%E7%BB%8F%E9%AA%8C%E5%88%86%E4%BA%AB/" />
|
||||||
<category term="PicGo" scheme="https://blog.jingxiyuan.cn/tags/PicGo/" />
|
|
||||||
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
||||||
|
<category term="PicGo" scheme="https://blog.jingxiyuan.cn/tags/PicGo/" />
|
||||||
<pubDate>Wed, 12 Oct 2022 14:40:00 +0800</pubDate>
|
<pubDate>Wed, 12 Oct 2022 14:40:00 +0800</pubDate>
|
||||||
<description><![CDATA[ <h1 id="简介"><a class="anchor" href="#简介">#</a> 简介</h1>
|
<description><![CDATA[ <h1 id="简介"><a class="anchor" href="#简介">#</a> 简介</h1>
|
||||||
<p>PicGo 是一款开源的图床管理工具,十分流行。</p>
|
<p>PicGo 是一款开源的图床管理工具,十分流行。</p>
|
||||||
@ -777,11 +833,11 @@ server &#123;
|
|||||||
<category term="极空间" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
<category term="Docker" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" />
|
<category term="Docker" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" />
|
||||||
<category term="技术分享" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" />
|
<category term="技术分享" scheme="https://blog.jingxiyuan.cn/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" />
|
||||||
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
|
||||||
<category term="docker" scheme="https://blog.jingxiyuan.cn/tags/docker/" />
|
|
||||||
<category term="极空间" scheme="https://blog.jingxiyuan.cn/tags/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
<category term="极空间" scheme="https://blog.jingxiyuan.cn/tags/%E6%9E%81%E7%A9%BA%E9%97%B4/" />
|
||||||
|
<category term="docker" scheme="https://blog.jingxiyuan.cn/tags/docker/" />
|
||||||
<category term="图床" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E5%BA%8A/" />
|
<category term="图床" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E5%BA%8A/" />
|
||||||
<category term="图片上传" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E7%89%87%E4%B8%8A%E4%BC%A0/" />
|
<category term="图片上传" scheme="https://blog.jingxiyuan.cn/tags/%E5%9B%BE%E7%89%87%E4%B8%8A%E4%BC%A0/" />
|
||||||
|
<category term="chevereto" scheme="https://blog.jingxiyuan.cn/tags/chevereto/" />
|
||||||
<pubDate>Fri, 16 Sep 2022 08:04:00 +0800</pubDate>
|
<pubDate>Fri, 16 Sep 2022 08:04:00 +0800</pubDate>
|
||||||
<description><![CDATA[ <h1 id="安装准备"><a class="anchor" href="#安装准备">#</a> 安装准备</h1>
|
<description><![CDATA[ <h1 id="安装准备"><a class="anchor" href="#安装准备">#</a> 安装准备</h1>
|
||||||
<ol>
|
<ol>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
tags/Wordpress/index.html
Normal file
1
tags/Wordpress/index.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user