Network

The a2ensite command

Enables an Apache site (virtual host) by creating the link in sites-enabled.

Syntax

sudo a2ensite <sitio>Try it in the terminal →

Copy-ready examples

$ sudo a2ensite aulaEnable the aula vhost

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • After enabling it, reload Apache: systemctl reload apache2.

FAQ

What does a2ensite do?

It enables an Apache site by creating the link in sites-enabled.

How do I disable it?

With a2dissite.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course