참고 자료: https://askubuntu.com/questions/629995/apache-not-able-to-restart
apache2 같은 경우
다음과 같이 에러나 나면서 실행이 안될 수 있습니다.
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-05-27 15:26:18 KST; 37ms ago
Process: 4183 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)5월 27 15:26:18 ns systemd[1]: Starting The Apache HTTP Server...
5월 27 15:26:18 ns apachectl[4183]: apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory
5월 27 15:26:18 ns apachectl[4183]: Action 'start' failed.
5월 27 15:26:18 ns apachectl[4183]: The Apache error log may have more information.
5월 27 15:26:18 ns systemd[1]: apache2.service: Control process exited, code=exited status=1
5월 27 15:26:18 ns systemd[1]: Failed to start The Apache HTTP Server.
5월 27 15:26:18 ns systemd[1]: apache2.service: Unit entered failed state.
5월 27 15:26:18 ns systemd[1]: apache2.service: Failed with result 'exit-code'.
이런경우, 삭제 후 재설치 해야 하는데, 그 방법도 단순히 apt-get install, apt-get remove 로는 되지 않습니다.
The problem is because some configuration files are deleted, you have to reinstall it.
REINSTALL APACHE2:
To replace configuration files that have been deleted, without purging the package, you can do:
sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2
To fully remove the apache2 config files, you should:
sudo apt-get purge apache2
which will then let you reinstall it in the usual way with:
sudo apt-get install apache2
Purge is required to remove all the config files - if you delete the config files but only remove the package, then this is remembered & missing config files are not reinstalled by default.
'Linux LIFE' 카테고리의 다른 글
지네, 노래기, 돈벌레(그리마) 같은 다족류의 다리 움직임 살펴보기 (0) | 2020.04.16 |
---|---|
우분투 리눅스에 원격데스크탑(TightVNC) 설치 하는 방법, 접속하는 방법 (0) | 2019.09.09 |
아파치 웹서버 리스팅 스타일 수정 방법 (apache web server / index of / style / indexStyleSheet ) (0) | 2019.09.09 |
리눅스, ubuntu, 서브폴더를 2차도메인으로 (0) | 2017.12.08 |
ubuntu, bind9 네임서버 설치하기 (0) | 2017.12.06 |