【发布时间】:2019-11-25 01:24:59
【问题描述】:
我承诺使用 wordpress 多站点。该网站可以通过http从局域网访问,但不能使用https。
我现在的目标是将网站发布到互联网上。我有反向代理和 DNS 服务器,但我很确定,问题不在于它们。
以下是错误:
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
ddmc.co.id
Apache/2.4.39 (Win64) OpenSSL/1.1.1b PHP/7.3.4
这是当前配置:
WP_2_OPTION
siteurl: http://ddmc.co.id/id
home: http://ddmc.co.id/id
WP_SITE
domain: ddmc.co.id
path: /
WP_SITEMETA
siteurl: http://ddmc.co.id
WP_BLOGS
domain: ddmc.co.id path:/
domain: ddmc.co.id path:/id/
WP_OPTION
domain: http://ddmc.co.id path:/
domain: http://ddmc.co.id path:/id/
wp-config.php
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'ddmc.co.id');
define('PATH_CURRENT_SITE','/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT', 1);
define('WP_MEMORY_LIMIT', '512M');
htaccess
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress
htpd-vhosts
<Directory "c:/xampp/htdocs/ddmc">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
我已经解决了一个星期没有成功,请帮助。
【问题讨论】:
-
Apache 通常将 HTTPS 视为端口 443 上的单独虚拟主机。您设置了吗?我会尝试显式地转到 /index.php 以检查重写规则或 CGI 设置是否存在问题。您也可以尝试在后台运行 procmon 以准确检查它正在为 SSL 案例读取哪个文件夹。
-
还没有(我会尝试),我是否应该创建 csr 并安装 .cer 以进行考试,因为我已经在反向代理上安装了证书。你能解释一下关于检查 index.php 重写规则的更多信息吗?我会尝试安装 procmon。
-
我刚刚意识到我有另一个 xampp Web 服务器,在虚拟主机上配置了端口 80,并且使用反向代理正常运行。
-
我尝试使用具有相同 DNS 和反向代理配置的另一个网站(不同的 IP、服务器)。它的作品!所以我认为问题是因为 wordpress 多站点。 phpmyadmin 和 wp_config 中有很多 URL 配置。
标签: wordpress