After run sudo service apache2 restart show this error:
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-08-20 07:36:07 UTC; 18s ago
Process: 27890 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Aug 20 07:36:07 debian apachectl[27890]: (98)Address already in use: AH00072: make_sock: could not bi
Aug 20 07:36:07 debian apachectl[27890]: (98)Address already in use: AH00072: make_sock: could not bi
Aug 20 07:36:07 debian apachectl[27890]: no listening sockets available, shutting down
Aug 20 07:36:07 debian apachectl[27890]: AH00015: Unable to open logs
Aug 20 07:36:07 debian apachectl[27890]: Action 'start' failed.
Aug 20 07:36:07 debian apachectl[27890]: The Apache error log may have more information.
Aug 20 07:36:07 debian systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 20 07:36:07 debian systemd[1]: Failed to start The Apache HTTP Server.
Aug 20 07:36:07 debian systemd[1]: apache2.service: Unit entered failed state.
Aug 20 07:36:07 debian systemd[1]: apache2.service: Failed with result 'exit-code'.
I install gitlab on ubunti with bitnami gitlab.
How to fix this error?
You can check whether your config is correct with
# apachectl configtest
Syntax OK
Like already pointed out, it seems like the port is under use, so check which program is using it
# netstat -tulpn
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::80 :::* LISTEN 5170/apache2
tcp6 0 0 :::443 :::* LISTEN 5170/apache2
and then kill the process with
kill -15 <proces_id>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.