%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%BD%8D%E4%BA%8E%E7%AB%AF%E5%8F%A3%20443%EF%BC%8C%E7%94%A8%E4%BA%8E%20wordpress.png)
答案1
获得问题的解决方案,需要更改apache2.conf
文件后才能起作用,
旧代码/etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
改变成
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
之后,为了让 Apache 理解重写规则,我们首先需要激活 mod_rewrite。它已经安装,但在默认的 Apache 安装中被禁用。使用 a2enmod 命令启用该模块:
$ sudo a2enmod rewrite
这将激活模块或提醒您模块已启用。要使这些更改生效,请重新启动 Apache。
$ sudo systemctl restart apache2
它最终对我有用。