WordPress多站点子目录错误:500、重定向太多、404等。

大家好。我在安装多站点WordPress时花了不少时间。我已经花了大约两个星期的时间在这上面,并且犯了一些错误。我仔细阅读了论坛、博客和帮助文章,尝试了任何可用的建议。已经取得了进展,但尚未完全奏效。 网址信息 https://www.draggoo.com https://www.draggoo.com/~凯文 https://www.draggoo.com/wordpress https://www.draggoo.com/wordpress/kevin 每个家庭成员将有自己的博客,这就是为什么我们有多个网站建立。理论上讲,我们可以有以下内容: https://www.draggoo.com/wordpress/sarah etc. 环境 Gentoo nginx MariaDB WordPress nginx配置文件位于: /etc/nginx/nginx.cong公司 根example.com网站文件夹位于: /var/www/localhost/htdocs 安装了WordPress在: /var/www/localhost/htdocs/wordpress 当前问题https://www.draggoo.com/wordpress/kevin没有任何格式 https://www.draggoo.com/wordpress/kevin/wp-admin/显示许多重定向 其他当前行为 https://www.draggoo.com作品 https://www.draggoo.com/~凯文作品 https://www.draggoo.com/wordpress作品 https://www.draggoo.com/wordpress/wp-admin作品 笔记 我不在乎Draggoo.com网站. 它现在有一个到wordpress网站的链接,就这样。 我也不在乎Draggoo.com网站/~z~凯文。我在10年前用iWeb建立了它。它是用来存档的。 文件 (敏感信息已被剥离) (希望格式化结果正常)。 nginx.conf文件 user nginx nginx;worker_processes 1;error_log /var/log/nginx/error_log info;events {worker_connections 1024;use epoll;}http {include /etc/nginx/mime.types;default_type application/octet-stream;log_format main\"$remote_addr - $remote_user [$time_local] \"\"\"$request\" $status $bytes_sent \"\"\"$http_referer\" \"$http_user_agent\" \"\"\"$gzip_ratio\"\";client_header_timeout 10m;client_body_timeout 10m;send_timeout 10m;connection_pool_size 256;client_header_buffer_size 1k;large_client_header_buffers 4 2k;request_pool_size 4k;gzip off;output_buffers 1 32k;postpone_output 1460;sendfile on;tcp_nopush on;tcp_nodelay on;keepalive_timeout 75 20;ignore_invalid_headers on;map $uri $blogname{~^(?P/[^/]+/)files/(.*)$blogpath ;}map $blogname $blogid{default -999;kevin 2;#Ref: http://wordpress.org/extend/plugins/nginx-helper/#include /var/www/wordpress/wp-content/plugins/nginx-helper/map.conf ;}# Redirects all http requests to httpsserver {listen 80;listen [::]:80;server_name draggoo.com www.draggoo.com;return 301 https://www.draggoo.com$request_uri;}# WED-# Adding this to redirect all non-www.-having URLs to www.server {listen443 ssl;server_namedraggoo.com;ssl_certificatexxx.crt;ssl_certificate_keyxxx.key;return 301 https://www.draggoo.com$request_uri;}# Server settings for all https requestsserver {# http ports and URLs these server details will apply to# listen 127.0.0.1;# listen 443 ssl http2;listen 443;# List of server namesserver_name www.draggoo.com;# SSL config - See https://www.bjornjohansen.com/securing-nginx-ssl for referencessl_certificate xxx.crt;ssl_certificate_key xxx.key;ssl_session_cache shared:SSL:20m;ssl_session_timeout 180m;ssl_protocols TLSv1.2 TLSv1.3; #TLS v1.0 and v1.1 were deprecated in 2020ssl_prefer_server_ciphers on;ssl_ciphers xxx;ssl_dhparam xxx.pem;add_header>Expand restrictions.conf # Global restrictions configuration file.# Designed to be included in any server>Expand wp-config.php Expand db.wp_options.home MariaDB [wordpress]> select * from wp_options where> db.wp_2_options.home MariaDB [wordpress]> select * from wp_2_options where> db.wp_options.siteurl MariaDB [wordpress]> select * from wp_options where> db.wp_2_options.siteurl MariaDB [wordpress]> select * from wp_2_options where> db.wp_blogs MariaDB [wordpress]> select * from wp_blogs;+---------+---------+-----------------+-------------------+---------------------+---------------------+--------+----------+--------+------+---------+---------+| blog_id | site_id | domain| path| registered| last_updated| public | archived | mature | spam | deleted | lang_id |+---------+---------+-----------------+-------------------+---------------------+---------------------+--------+----------+--------+------+---------+---------+|1 |1 | www.draggoo.com | /wordpress/| 2020-06-04 23:52:39 | 0000-00-00 00:00:00 |1 |0 |0 |0 |0 |0 ||2 |1 | www.draggoo.com | /wordpress/kevin/ | 2020-06-15 03:30:50 | 2020-06-15 03:30:50 |1 |0 |0 |0 |0 |0 |+---------+---------+-----------------+-------------------+---------------------+---------------------+--------+----------+--------+------+---------+---------+2 rows in set (0.000 sec) .htaccess 我删除了这个文件,因为我正在使用nginx。 最后的想法 我更喜欢知道更改的\"原因\",而不是盲目地尝试不同的选项,不过,我并不反对根据经验提出的建议。 并提前感谢您的帮助! ~Kevin 我需要帮助的页面:[登录以查看链接] 来自https://www.newsdawnn.com.ng资讯科技非常快速 我不建议在Apache以外的任何东西上运行多站点…如果您愿意,请将Nginx保存为反向代理。 但这是我的意见,我这么说…… 既然您正在使用Nginx,我真的希望如此您将等效的htaccess指令放入Nginx配置中。 我还建议将WordPress放在该域名的服务器根目录中,以减少所需重写的复杂性。我也喜欢在自己的目录下运行WordPress的第二种方法,我更喜欢在自己的多站点上运行。更干净了! https://wordpress.org/support/article/giving-wordpress-its-own-directory/ \"tilde names\"下的域可能需要特殊处理和重定向或其他什么…我觉得我们在这些论坛上不能处理这些问题,但我相信在其他一些论坛上会有一位Nginx服务器专家可以帮助您处理这一部分。也许是StackExchange? 我的想法是将tilde命名的站点放到一个子目录或htaccess类型指令(munged与Nginx一起工作)中,然后通过元刷新重定向到WordPress,但这只是一个混乱的解决方案,因为我想不出一个优雅的答案来解决这个问题

admin_action_{$_REQUEST[‘action’]}

do_action( "admin_action_{$_REQUEST[‘action’]}" )动作钩子::在发送“Action”请求变量时激发。Action Hook: Fires when an ‘action’ request variable is sent.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$_REQUEST['action']引用从GET或POST请求派生的操作。源码(Source)更新版本源码位置使用被使用2.6.0 wp-admin/admin.php:...

日期:2020-09-02 17:44:16 浏览:1167

admin_footer-{$GLOBALS[‘hook_suffix’]}

do_action( "admin_footer-{$GLOBALS[‘hook_suffix’]}", string $hook_suffix )操作挂钩:在默认页脚脚本之后打印脚本或数据。Action Hook: Print scripts or data after the default footer scripts.目录锚点:#说明#参数#源码说明(Description)钩子名的动态部分,$GLOBALS['hook_suffix']引用当前页的全局钩子后缀。参数(Parameters)参数类...

日期:2020-09-02 17:44:20 浏览:1069

customize_save_{$this->id_data[‘base’]}

do_action( "customize_save_{$this->id_data[‘base’]}", WP_Customize_Setting $this )动作钩子::在调用WP_Customize_Setting::save()方法时激发。Action Hook: Fires when the WP_Customize_Setting::save() method is called.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_data...

日期:2020-08-15 15:47:24 浏览:806

customize_value_{$this->id_data[‘base’]}

apply_filters( "customize_value_{$this->id_data[‘base’]}", mixed $default )过滤器::过滤未作为主题模式或选项处理的自定义设置值。Filter Hook: Filter a Customize setting value not handled as a theme_mod or option.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_date['base'],指的是设置...

日期:2020-08-15 15:47:24 浏览:898

get_comment_author_url

过滤钩子:过滤评论作者的URL。Filter Hook: Filters the comment author’s URL.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/comment-template.php:32610...

日期:2020-08-10 23:06:14 浏览:930

network_admin_edit_{$_GET[‘action’]}

do_action( "network_admin_edit_{$_GET[‘action’]}" )操作挂钩:启动请求的处理程序操作。Action Hook: Fires the requested handler action.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$u GET['action']引用请求的操作的名称。源码(Source)更新版本源码位置使用被使用3.1.0 wp-admin/network/edit.php:3600...

日期:2020-08-02 09:56:09 浏览:876

network_sites_updated_message_{$_GET[‘updated’]}

apply_filters( "network_sites_updated_message_{$_GET[‘updated’]}", string $msg )筛选器挂钩:在网络管理中筛选特定的非默认站点更新消息。Filter Hook: Filters a specific, non-default site-updated message in the Network admin.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分$_GET['updated']引用了非默认的...

日期:2020-08-02 09:56:03 浏览:863

pre_wp_is_site_initialized

过滤器::过滤在访问数据库之前是否初始化站点的检查。Filter Hook: Filters the check for whether a site is initialized before the database is accessed.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/ms-site.php:93910...

日期:2020-07-29 10:15:38 浏览:833

WordPress 的SEO 教学:如何在网站中加入关键字(Meta Keywords)与Meta 描述(Meta Description)?

你想在WordPress 中添加关键字和meta 描述吗?关键字和meta 描述使你能够提高网站的SEO。在本文中,我们将向你展示如何在WordPress 中正确添加关键字和meta 描述。为什么要在WordPress 中添加关键字和Meta 描述?关键字和说明让搜寻引擎更了解您的帖子和页面的内容。关键词是人们寻找您发布的内容时,可能会搜索的重要词语或片语。而Meta Description则是对你的页面和文章的简要描述。如果你想要了解更多关于中继标签的资讯,可以参考Google的说明。Meta 关键字和描...

日期:2020-10-03 21:18:25 浏览:1719

谷歌的SEO是什么

SEO (Search Engine Optimization)中文是搜寻引擎最佳化,意思近于「关键字自然排序」、「网站排名优化」。简言之,SEO是以搜索引擎(如Google、Bing)为曝光媒体的行销手法。例如搜寻「wordpress教学」,会看到本站的「WordPress教学:12个课程…」排行Google第一:关键字:wordpress教学、wordpress课程…若搜寻「网站架设」,则会看到另一个网页排名第1:关键字:网站架设、架站…以上两个网页,每月从搜寻引擎导入自然流量,达2万4千:每月「有机搜...

日期:2020-10-30 17:23:57 浏览:1308