What is the difference between sites-enabled and sites-available directory?

前端 未结 3 1012
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 09:15

What is use of these two directories in apache2 and how can we do it?

3条回答
  •  青春惊慌失措
    2020-12-07 09:55

    The difference is that virtual sites listed in the sites-enabled directory are served by apache. In the sites-available directory there are the virtual sites that exist on your server but people can't access them because they are not enabled yet.

    sites-available: this directory has configuration files for Apache2 Virtual Hosts. Virtual Hosts allow Apache2 to be configured for multiple sites that have separate configurations.

    sites-enabled: like mods-enabled, sites-enabled contains symlinks to the /etc/apache2/sites-available directory. Similarly when a configuration file in sites-available is symlinked, the site configured by it will be active once Apache2 is restarted.

    See here https://help.ubuntu.com/lts/serverguide/httpd.html

提交回复
热议问题