“启用站点"和“可用站点"目录有什么区别? [英] What is the difference between the 'sites-enabled' and 'sites-available' directory?

查看:42
本文介绍了“启用站点"和“可用站点"目录有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apache 2中这两个目录的用途是什么?

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

推荐答案

区别在于 sites-enabled 目录中列出的虚拟站点由Apache服务.在 sites-available 目录中,您的服务器上存在虚拟站点,但是由于尚未启用,人们无法访问它们.

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.

站点可用::该目录包含Apache 2虚拟主机的配置文件.虚拟主机允许为Apache 2配置多个具有单独配置的网站.

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

已启用站点:像启用了mods一样,已启用站点包含指向以下站点的符号链接/etc/apache2/sites-available目录.同样,当站点中的配置文件是符号链接的,该站点重新启动Apache2后,由它配置的配置将处于活动状态.

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.

请参见 https://help.ubuntu.com/lts/serverguide/httpd.html .

这篇关于“启用站点"和“可用站点"目录有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆