zoukankan      html  css  js  c++  java
  • [Ubuntu] Invalid command 'VirtualDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration

    When i set the virtualhost as: 

    VirtualDocumentRoot /var/www/%1
    <VirtualHost *:80>
       DocumentRoot /var/www
       ServerName myhost
    </VirtualHost>

    I got these error:

    Syntax error on line 33 of /etc/apache2/sites-enabled/000-default:
    Invalid command 'VirtualDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration
    Action 'configtest' failed.
    The Apache error log may have more information.
       ...fail!

    After googling, i found that i forgot to enable the vhost_alias.load module in apache!

    Just follow these:

    sudo ln -s /etc/apache2/mods-available/vhost_alias.load /etc/apache2/mods-enabled

    Have fun with Ubuntu! 

  • 相关阅读:
    JSON基础知识
    Java 环境配置
    接口测试基础知识
    Fiddler初学笔记
    es6数组方法findIndex()
    sass+less相关
    前端库/框架/插件相关
    知名博主相关
    CSS相关
    移动Web相关
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/2767757.html
Copyright © 2011-2022 走看看