{
    "mode": "man",
    "parameter": "a2ensite",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/a2ensite/8/json",
    "generated": "2026-06-16T10:10:25Z",
    "synopsis": "a2ensite [-q|--quiet] [-m|--maintmode] [ site ]\na2dissite [-q|--quiet] [-m|--maintmode] [-p|--purge] [ site ]",
    "sections": {
        "NAME": {
            "content": "a2ensite, a2dissite - enable or disable an apache2 site / virtual host\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "a2ensite [-q|--quiet] [-m|--maintmode] [ site ]\n\na2dissite [-q|--quiet] [-m|--maintmode] [-p|--purge] [ site ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This manual page documents briefly the a2ensite and a2dissite commands.\n\na2ensite  is  a script that enables the specified site (which contains a <VirtualHost> block)\nwithin  the  apache2   configuration.    It   does   this   by   creating   symlinks   within\n/etc/apache2/sites-enabled.   Likewise, a2dissite disables a site by removing those symlinks.\nIt is not an error to enable a site which is already enabled, or to disable one which is  al‐\nready disabled.\n\nApache treats the very first virtual host enabled specially as every request not matching any\nactual directive is being redirected there. Thus it should be called 000-default in order  to\nsort before the remaining hosts to be loaded first.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-q, --quiet",
                    "content": "Don't show informative messages.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-m, --maintmode",
                    "content": "Enables  the  maintainer mode, that is the program invocation is effectuated automati‐\ncally by a maintainer script. This switch should not be used by end users.\n",
                    "flag": "-m",
                    "long": "--maintmode"
                },
                {
                    "name": "-p, --purge",
                    "content": "When disabling a module, purge all traces of the module in  the  internal  state  data\nbase.\n",
                    "flag": "-p",
                    "long": "--purge"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "a2ensite  and  a2dissite exit with status 0 if all sites are processed successfully, 1 if er‐\nrors occur, 2 if an invalid option was used.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "a2dissite 000-default\n\nDisables the default site.\n",
            "subsections": []
        },
        "FILES": {
            "content": "",
            "subsections": [
                {
                    "name": "/etc/apache2/sites-available",
                    "content": "Directory with files giving information on available sites.\n"
                },
                {
                    "name": "/etc/apache2/sites-enabled",
                    "content": "Directory with links to the files in sites-available for enabled sites.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "apache2ctl(8), a2enmod(8), a2dismod(8), a2enconf(8), a2disconf(8).\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This manual page was written by Stefan Fritsch <sf@debian.org> (based on the  a2enmod  manual\npage by Daniel Stone <daniel@sfarc.net>) for the Debian GNU/Linux distribution.\n\n\n\n8 June 2007                                 A2ENSITE(8)",
            "subsections": []
        }
    },
    "summary": "a2ensite, a2dissite - enable or disable an apache2 site / virtual host",
    "flags": [
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Don't show informative messages."
        },
        {
            "flag": "-m",
            "long": "--maintmode",
            "arg": null,
            "description": "Enables the maintainer mode, that is the program invocation is effectuated automati‐ cally by a maintainer script. This switch should not be used by end users."
        },
        {
            "flag": "-p",
            "long": "--purge",
            "arg": null,
            "description": "When disabling a module, purge all traces of the module in the internal state data base."
        }
    ],
    "examples": [
        "a2dissite 000-default",
        "Disables the default site."
    ],
    "see_also": [
        {
            "name": "apache2ctl",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apache2ctl/8/json"
        },
        {
            "name": "a2enmod",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2enmod/8/json"
        },
        {
            "name": "a2dismod",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2dismod/8/json"
        },
        {
            "name": "a2enconf",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2enconf/8/json"
        },
        {
            "name": "a2disconf",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2disconf/8/json"
        }
    ]
}