ERROR -bash: syntax error near unexpected token `newline'

I got the error:

-bash: syntax error near unexpected token `newline'

while executing:

a2ensite <span style="color: #ff0000;">mysite.conf</span>

I am following this tutorial: https://subinsb.com/ubuntu-linux-create-localhost-website/


Actually you want to tell to apache2 to enable a site configuration file named mysite.conf:

a2ensite mysite.conf

The rest part of the line is HTML code that shouldn't be displayed in this way. As @steeldriver said this is ан error in the tutorial. In result the syntax is completely wrong... This code contains the semicolon character ; that can be used as newline token in Bash - the default user's shell in Ubuntu.

The command a2ensite expects name of any file located in /etc/apache2/sites-available. The name must end with .conf. The command creates symbolic links for these files into the directory /etc/apache2/sites-enabled/, thus they become enabled, when you reload the Apache's configuration.