a2dissite
enable or disable an apache2 site / virtual host
see also :
apache2ctl
Synopsis
a2ensite
[site]
a2dissite
[site]
add an example, a script, a trick and tips
examples
source
a2dissite vhost && a2ensite
vhost && service apache2 reload
a2dissite default
Disables the default site.
source
a2dismod shib2
a2dissite default-shib
remove_templates "apache" "colony_mod_shib2"
apt-get -y remove libapache2-mod-shib2
source
if ! type
a2dissite &> /dev/null; then
echo "post-domain-delete/apache2: 'a2dissite' was not
found or does not exist" >&2
elif ! a2dissite "$OZ_DOMAIN_NAME" > /dev/null; then
echo "post-domain-delete/apache2: failed to disable domain
'$OZ_DOMAIN_NAME'" >&2
source
sudo a2dissite default &&
sudo a2ensite ss &&sudo service
apache2 reload
source
a2enmod vhost_alias
a2dissite default
a2ensite jenkins
source
a2enmod xsendfile
a2dissite default
a2dissite 000-default
service apache2 reload
chown -R lamp.lamp /var/www
source
if ! type
a2dissite &> /dev/null; then
echo "post-domain-disable/apache2: 'a2dissite' was not
found or does not exist" >&2
elif ! a2dissite "$OZ_DOMAIN_NAME" > /dev/null; then
echo "post-domain-disable/apache2: failed to disable domain
'$OZ_DOMAIN_NAME'" >&2
source
sudo a2dissite ss && sudo
a2ensite default && sudo service
apache2 reload
source
a2enmod vhost_alias
a2enmod rewrite
a2enmod xsendfile
a2dissite default
a2dissite 000-default
service apache2 reload
chown -R lamp.lamp /var/www
description
This manual
page documents briefly the a2ensite and
a2dissite commands.
a2ensite
is a script that enables the specified site (which contains
a <VirtualHost> block) within the apache2
configuration. It does this by creating symlinks within
/etc/apache2/sites-enabled. Likewise,
a2dissite disables a site by removing those symlinks.
It is not an error to enable a site which is already
enabled, or to disable one which is already disabled.
The
default site is handled specially: The resulting
symlink will be called 000-default in order to be
loaded first.
files
/etc/apache2/sites-available
Directory with files giving information on available sites.
/etc/apache2/sites-enabled
Directory with links to the files in sites-available for
enabled sites.
see also
apache2ctl .
author
This manual
page was written by Stefan Fritsch <sf[:at:]debian[:dot:]org>
(based on the a2enmod manual page by Daniel Stone
<daniel[:at:]sfarc[:dot:]net>) for the Debian GNU/Linux
distribution.