命令'RewriteEngine'无效,但启用了mod_rewrite

时间:2016-05-03 23:40:51

标签: apache .htaccess gitlab

我正在使用此conf file

设置gitlab网站

但是出现了这个错误:

Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

我从源代码安装了apache 2.4.20。忘了我已经用apt-get安装了2.4.7。现在,apache -v显示2.4.7

我已经遵循了很多解决方案,但它们不起作用:

  

在httpd.conf文件中取消注释行LoadModule rewrite_module modules / mod_rewrite.so(从行前面删除英镑'#'符号)

Apache2 ProxyPass for Rails App Gitlab

我检查了重写模块,它就在那里; a2enmod rewrite已启用且service apache2 restart没有gitlab.conf文件。

但是对于gitlab.conf,此错误会显示为Invalid command 'RewriteEngine'

1 个答案:

答案 0 :(得分:0)

我使用Vagrant设置VM时遇到同样的问题 我最终通过在Vagrantfile配置中为客户端设置ip来解决这个问题:

config.vm.network :private_network, ip: "192.168.68.8"

然后添加到本地/ etc / hosts文件:

192.168.68.8    namespace.dev
相关问题