Enable an Apache site and reload
enable apache virtual host debian | a2ensite example.com | activate site in sites-available | add new domain apache ubuntu | a2ensite | virtualhost | systemctlCaution: This command changes the system. Understand what it does before you run it.
a2ensite example.com && apache2ctl configtest && systemctl reload apache2Links /etc/apache2/sites-available/<site>.conf into sites-enabled and reloads Apache if the syntax is correct. The name is given without the .conf extension. To disable a site, use a2dissite accordingly.
Note: Only for servers without Plesk. Plesk generates virtual hosts itself under /var/www/vhosts/system/<domain>/conf/, a2ensite has no business there.
Also searched as
- enable apache virtual host debian
- a2ensite example.com
- activate site in sites-available
- add new domain apache ubuntu