Error starting Apache

-1

HowdoIresolvethistypeoferror?

--Support:http://lists.freedesktop.org/mailman/listinfo/systemd-devel----Aunidadeapache2.serviceestásendoiniciada.Out2813:41:53fabiano-ubuntuapache2[2786]:*StartingApachehttpdwebserverapache2Out2813:41:53fabiano-ubuntuapache2[2786]:*Out2813:41:53fabiano-ubuntuapache2[2786]:*Theapache2configtestfailed.Out2813:41:53fabiano-ubuntuapache2[2786]:Outputofconfigtestwas:Out2813:41:53fabiano-ubuntuapache2[2786]:AH00526:Syntaxerroronline1of/etc/apache2/sites-enabled/000-default.conf:Out2813:41:53fabiano-ubuntuapache2[2786]:<VirtualHost>directivemissingclosing'>'Out2813:41:53fabiano-ubuntuapache2[2786]:Action'configtest'failed.Out2813:41:53fabiano-ubuntuapache2[2786]:TheApacheerrorlogmayhavemoreinformation.Out2813:41:53fabiano-ubuntusystemd[1]:apache2.service:Controlprocessexited,code=exitedstatus=1Out2813:41:53fabiano-ubuntusystemd[1]:FailedtostartLSB:Apache2webserver.--Subject:Aunidadeapache2.servicefalhou--Defined-By:systemd--Support:http://lists.freedesktop.org/mailman/listinfo/systemd-devel----Aunidadeapache2.servicefalhou.----Oresultadoéfailed.Out2813:41:53fabiano-ubuntusystemd[1]:apache2.service:Unitenteredfailedstate.Out2813:41:53fabiano-ubuntusystemd[1]:apache2.service:Failedwithresult'exit-code'.Out2813:41:53fabiano-ubuntupolkitd(authority=local)[951]:UnregisteredAuthenticationAgentforunix-process:2773:92828(systembusname

I'mwaitingforyou.

  

File000-default.conf

<VirtualHost>#rNamedirectivesetstherequestscheme,hostnameandportthat#theserverusestoidentifyitself.Thisi*:80>#TheServesusedwhencreating#redirectionURLs.Inthecontextofvirtualhosts,theServerName#specifieswhathostnamemustappearintherequest'sHost:headerto#matchthisvirtualhost.Forthedefaultvirtualhost(thisfile)this#valueisnotdecisiveasitisusedasalastresorthostregardless.#However,youmustsetitforanyfurthervirtualhostexplicitly.#ServerNamewww.example.comServerAdminwebmaster@localhostDocumentRoot/var/www/html#Availableloglevels:trace8,...,trace1,debug,info,notice,warn,#error,crit,alert,emerg.#Itisalsopossibletoconfiguretheloglevelforparticular#modules,e.g.#LogLevelinfossl:warnAllowOverrideAllErrorLog${APACHE_LOG_DIR}/error.logCustomLog${APACHE_LOG_DIR}/access.logcombined#Formostconfigurationfilesfromconf-available/,whichare#enabledordisabledatagloballevel,itispossibleto#includealineforonlyoneparticularvirtualhost.Forexamplethe#followinglineenablestheCGIconfigurationforthishostonly#afterithasbeengloballydisabledwith"a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    
asked by anonymous 28.10.2017 / 17:51

1 answer

2

You have edited the file /etc/apache2/sites-enabled/000-default.conf and forgot to specify the port, and close the VirtualHost directive.

AH00526: Syntax error on line 1 of /etc/apache2/sites-enabled/000-default.conf
<VirtualHost> directive missing closing '>'

Open the file

sudo gedit /etc/apache2/sites-enabled/000-default.conf

In the first line, just change

<VirtualHost

To

<VirtualHost *:80>

This virtual host section matches any requests that are made on the 80 port, the default HTTP port.

    
28.10.2017 / 18:12