Score:0

Failed to start The Apache HTTP Server. 20.0

us flag

When I try to start my Apache server, I get this message:

Job for apache2.service failed because the control process exited
with error code. See "systemctl status apache2.service" and
"journalctl -xe" for details.

Calling journalctl -xe returns:

Oct 02 10:01:00 mysite.com systemd[1]: Started User Manager for UID 1000.
Subject: A start job for unit [email protected] has finished successfully
Defined-By: systemd
Support: http://www.ubuntu.com/support

A start job for unit [email protected] has finished successfully.

The job identifier is 6994.

Oct 02 10:01:00 mysite.com systemd[1]: Started Session 66 of user admin.
Subject: A start job for unit session-66.scope has finished successfully
Defined-By: systemd 
Support: http://www.ubuntu.com/support

A start job for unit session-66.scope has finished successfully.
The job identifier is 7083.

Oct 02 10:01:48 mysite.com sudo[11130]: admin : TTY=pts/0 ; PWD=/home/admin ; USER=root ; COMMAND=/usr/bin/nano /etc/apache2/sites-enabled/000-default.conf
Oct 02 10:01:48 mysite.com sudo[11130]: pam_unix(sudo:session): session opened for user root by admin(uid=0)
Oct 02 10:03:01 mysite.com sudo[11135]:  admin : TTY=pts/0 ; PWD=/home/admin ; USER=root ; COMMAND=/usr/bin/nano /etc/apache2/sites-enabled/mysite.com
Oct 02 10:03:01 mysite.com sudo[11135]: pam_unix(sudo:session): session opened for user root by admin(uid=0)
Oct 02 10:03:06 mysite.com sudo[11138]:  admin : TTY=pts/0 ; PWD=/home/admin ; USER=root ; COMMAND=/usr/bin/nano /etc/apache2/sites-enabled/mysite.com.conf
Oct 02 10:03:06 mysite.com sudo[11138]: pam_unix(sudo:session): session opened for user root by admin(uid=0)
Oct 02 10:03:50 mysite.com sudo[11145]:  admin : TTY=pts/0 ; PWD=/home/admin ; USER=root ; COMMAND=/usr/bin/systemctl start apache2
Oct 02 10:03:50 mysite.com sudo[11145]: pam_unix(sudo:session): session opened for user root by admin(uid=0)
Oct 02 10:03:50 mysite.com systemd[1]: Starting The Apache HTTP Server...
Subject: A start job for unit apache2.service has begun execution  Defined-By: systemd
Support: http://www.ubuntu.com/support

A start job for unit apache2.service has begun execution. The job identifier is 7173.

Oct 02 10:03:50 mysite.com apachectl[11156]: AH00112: Warning: DocumentRoot [/html/www/html] does not exist
Oct 02 10:03:50 mysite.com apachectl[11156]: (98) Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 02 10:03:50 mysite.com apachectl[11156]: (98)Address already in use: AH00072: make_sock: could not bind to address
0.0.0.0:80
Oct 02 10:03:50 mysite.com apachectl[11156]: no listening sockets available, shutting down
Oct 02 10:03:50 mysite.com apachectl[11156]: AH00015: Unable to open logs
Oct 02 10:03:50 mysite.com apachectl[11148]: Action 'start' failed. Oct 02 10:03:50 mysite.com apachectl[11148]: The Apache error log may have more information.
Oct 02 10:03:50 mysite.com systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Subject: Unit process exited 
Defined-By: systemd
Support: http://www.ubuntu.com/support

An ExecStart= process belonging to unit apache2.service has exited.

The process' exit code is 'exited' and its exit status is 1.
Oct 02 10:03:50 mysite.com systemd[1]: apache2.service: Failed with result 'exit-code'.
Subject: Unit failed
Defined-By: systemd
Support: http://www.ubuntu.com/support

The unit apache2.service has entered the 'failed' state with result 'exit-code'.

Oct 02 10:03:50 mysite.com systemd[1]: Failed to start The Apache HTTP Server.
Subject: A start job for unit apache2.service has failed  Defined-By: systemd
Support: http://www.ubuntu.com/support

A start job for unit apache2.service has finished with a failure.

The job identifier is 7173 and the job result is failed.

Oct 02 10:03:50 mysite.com sudo[11145]: pam_unix(sudo:session): session closed for user root

Anyone have a suggestion?

Wayne Vosberg avatar
bd flag
It is exactly what it says: for every <VirtualHost> you need a </VirtualHost>
Lennard K avatar
us flag
Yeah i got that part but now it gives a diffrent error now it says: AH00112: Warning: DocumentRoot [/html/www/html] does not exist AH00526: Syntax error on line 25 of /etc/apache2/sites-enabled/000-default.conf: Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information.
Lennard K avatar
us flag
the same for Rewriterule etc
in flag
Unless you’ve been doing things to the default file structure, `/html/www/html` is not a valid location for Apache. You might want `/var/www/html` or some other location in `/var/www`. Given the number of challenges you’re facing with this virtual host config, perhaps you could [edit] your question to include the entire content of the `.conf` file
David avatar
cn flag
There is no such Ubuntu version as 20.0
Lennard K avatar
us flag
I edited the post with more information because the apache server wont start
in flag
While there may be a bit more information, the details requested yesterday have not yet been added. It would be really helpful to see the contents of your VirtualHost file, as it *looks* like you may be referring to an incorrect directory but, without seeing the configuration file, this is just a guess ...
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.