Ubuntu Server下启用Apache Rewrite模块

By 大伟哥 | 2020-03-24,周二, 16:33

Apache启用Rerite模块

如果你在安装Drupal的时候看到这样的提示,说明你的服务器禁用了rewrite模块,或者启用了模块但是没有配置好。

Ubuntu Server默认安装的Apache服务器,是没有启用rewrite的,有这个提示很正常,要启用这个模块也很简单:

sudo a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2
sudo systemctl restart apache2

这就解决了,再次刷新页面,警告提示就消失了。

解释一下命令,方便记忆:

a2enmod = apache2 enable module

相应地,禁用某个模块就是a2dismod = apache2 disable module。

 

添加新评论

此字段内容将保密,不会被其他人看见。
  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
发布评论前,请通过下面的验证,以免被当作垃圾评论机器人屏蔽。
3 + 6 =
计算出这道简单的算术题并键入答案。例如、1+3,就输入 4。