← 返回命令列表

Linux command

a2dissite 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Disable

sudo a2dissite [virtual_host]

Example

sudo a2dissite -q [virtual_host]

Example

sudo a2dissite -p [virtual_host]

说明

a2dissite is a Debian-specific utility that disables Apache2 virtual host configurations by removing symbolic links from /etc/apache2/sites-enabled. Site configuration files remain in /etc/apache2/sites-available and can be re-enabled later. The tool silently succeeds if the specified site is already disabled. After disabling a site, Apache must be restarted or reloaded for changes to take effect.

参数

-q, --quiet
Don't show informative messages
-m, --maintmode
Enables maintainer mode; the program invocation is effectuated automatically by a maintainer script
-p, --purge
When disabling a site, purge all traces from the internal state database

FAQ

What is the a2dissite command used for?

a2dissite is a Debian-specific utility that disables Apache2 virtual host configurations by removing symbolic links from /etc/apache2/sites-enabled. Site configuration files remain in /etc/apache2/sites-available and can be re-enabled later. The tool silently succeeds if the specified site is already disabled. After disabling a site, Apache must be restarted or reloaded for changes to take effect.

How do I run a basic a2dissite example?

Run `sudo a2dissite [virtual_host]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -q, --quiet do in a2dissite?

Don't show informative messages