Score:0

Apache server error Ubuntu 18: Syntax error on line 1: directive missing closing >

cn flag

I've been trying to get my Apache server running on Ubuntu, but in my

/etc/apache2/sites-enabled/dev.lamp.test.conf

file I get this error when I run apachectl stop

AH00526: Syntax error on line 1 of /etc/apache2/sites-enabled/dev.lamp.test.conf:
<VirtualHost> directive missing closing '>'
Action 'stop' failed.

My file looks like this:

<VirtualHost 10.0.2.15
191.168.56.103:80>
    ServerName dev.lamp.test
    DocumentRoot /srv/www/dev.lamp.test/public_html/
    ErrorLog /srv/www/dev.lamp.test/logs/error.log
    CustomLog /srv/www/dev.lamp.test/logs/access.log combined
</VirtualHost>

I'm not sure what's going on. I've checked the other files in the directory and the VirtualHost tags are all closed properly. Thank you for any help! Please let me know if you need additional information.

Score:0
it flag

The error message is clear, missing closing > at line 1 mean you need to write the <VirtualHost> tag on one line.

From doc, ip addresses must be space separated.

<VirtualHost 10.0.2.15 191.168.56.103:80>
Andrew Hickman avatar
cn flag
Thank you very much. That was it. Silly me. I appreciate your help.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.