title: 树莓派:安装wordpress tags: [] id: '2024' categories:
用Docker安装好了宝塔面板,外网机器反代了Jsdeliver,接下来可以安装wordpress了。顺便通过gitee中转镜像了一个主题,一个sqlite插件。
sub_filter_once off;
sub_filter_types *;
sub_filter "<jsdelivr的地址>" "jscdn.limour.top";
location / {
if (!-e $request_filename) {
rewrite (.*) /index.php;
}
}
访问网站完成安装
define('DB_TYPE', 'sqlite');
define('DB_DIR', '/www/wwwroot/127.0.0.1/');
define('DB_FILE', '.ht.sqlite');
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$list = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $list[0];
$_SERVER['HTTPS']='on';
$_SERVER["SERVER_PORT"] = 443;
define('WP_HOME', 'https://'.$_SERVER['HTTP_HOST']);
define('WP_SITEURL', 'https://'.$_SERVER['HTTP_HOST']);
define('WP_CONTENT_URL', 'https://'.$_SERVER['HTTP_HOST'].'/wp-content');
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);
}