Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Fri 2019-08-30 13:49:57 CEST; 9ms ago
Process: 10297 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 13929 (code=exited, status=0/SUCCESS)
Aug 30 13:49:57 entrospace.nilebasin.org systemd[1]: Starting The Apache HTTP Server...
Aug 30 13:49:57 entrospace.nilebasin.org apachectl[10297]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Aug 30 13:49:57 entrospace.nilebasin.org apachectl[10297]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Aug 30 13:49:57 entrospace.nilebasin.org apachectl[10297]: no listening sockets available, shutting down
Aug 30 13:49:57 entrospace.nilebasin.org apachectl[10297]: AH00015: Unable to open logs
Aug 30 13:49:57 entrospace.nilebasin.org apachectl[10297]: Action 'start' failed.
Aug 30 13:49:57 entrospace.nilebasin.org apachectl[10297]: The Apache error log may have more information.
Aug 30 13:49:57 entrospace.nilebasin.org systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 30 13:49:57 entrospace.nilebasin.org systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 30 13:49:57 entrospace.nilebasin.org systemd[1]: Failed to start The Apache HTTP Server.
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.35-5) ...
Asked
Active
Viewed 266 times
0
Arronical
- 19,653
- 18
- 73
- 128
1 Answers
0
It seems that port 80 is already in use. So, look into what is using port 80.
You can find the process using port 80 by the comand lsof -i:80' or if you want to free port 80 then you can kill the process by running command sudo kill -9 $(sudo lsof -t -i:80)
After this please restart apache2 with the command sudo service apache2 start
I hope it will help you.
Prince Kumar Barnwal
- 617
- 5
- 13
-
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] – Tirsit Endeshaw Aug 30 '19 at 12:16
-
I have updated the command try with that. – Prince Kumar Barnwal Aug 30 '19 at 12:20
-
It didn't look to work yet – Tirsit Endeshaw Aug 30 '19 at 12:24
-
the command kill -9 $(sudo lsof -t -i:80) didn't respond yet – Tirsit Endeshaw Aug 30 '19 at 12:30
-
You have to run `sudo kill -9 $(sudo lsof -t -i:80)` after this start your apache2 server by command `sudo service apache2 start` – Prince Kumar Barnwal Aug 30 '19 at 12:31
-
bash: kill: (2735) - Operation not permitted -bash: kill: (20449) - Operation not permitted -bash: kill: (20450) - Operation not permitted again this is the result – Tirsit Endeshaw Aug 30 '19 at 12:35
-
it worked thanks, and then how to get back to my repository? it show "Apache2 Ubuntu Default Page" instead of my repository. – Tirsit Endeshaw Aug 30 '19 at 12:42
-
Can you please any process is running on port 80 by `lsof -i:80` if the output is blank or nothing it means you can start your apache server. – Prince Kumar Barnwal Aug 30 '19 at 12:43
-
Please accept my answer and I am not getting your point – Prince Kumar Barnwal Aug 30 '19 at 12:45
-
http://entrospace.nilebasin.org/ check it this is the result. It was online document repository – Tirsit Endeshaw Aug 30 '19 at 13:01
-
If I am not wrong your apache index page showing instead of your project. If you want that your project to run than you have to pass your project folder path to the document root in the virtual host. – Prince Kumar Barnwal Aug 30 '19 at 13:11
-
You are right. how can I do that? or shall I restart tomcat also? how? – Tirsit Endeshaw Aug 30 '19 at 13:26
-
I already answered you need to change the document root Please look into this URL https://askubuntu.com/questions/337874/change-apache-document-root-folder-to-secondary-hard-drive and accept the answer. – Prince Kumar Barnwal Aug 30 '19 at 13:59