find / -name httpd.pid (httpd.pid 파일 찻기)
/var/run/httpd.pid
/usr/local/apache2/logs/httpd.pid (경로로 파일 복사)
-- httpd.conf -- (PidFile 경로추가)
:
ServerRoot "/usr/local/apache2"
PidFile /usr/local/apache2/logs/httpd.pid
:
:
-- httpd.conf -- (경로: /usr/local/apache2/bin)
# apachectl start
# ps aux | grep httpd
root 30008 0.0 0.6 6344 3440 ? Ss 01:52 0:00 /usr/local/apache/bin/httpd
nobody 30009 0.0 0.5 6344 2752 ? S 01:52 0:00 /usr/local/apache/bin/httpd
nobody 30010 0.0 0.5 6344 2752 ? S 01:52 0:00 /usr/local/apache/bin/httpd
nobody 30011 0.0 0.5 6344 2752 ? S 01:52 0:00 /usr/local/apache/bin/httpd
nobody 30012 0.0 0.5 6344 2752 ? S 01:52 0:00 /usr/local/apache/bin/httpd
nobody 30013 0.0 0.5 6344 2752 ? S 01:52 0:00 /usr/local/apache/bin/httpd
root 30033 0.0 0.0 1944 512 pts/2 R+ 01:55 0:00 grep httpd
- pid 파일을 삭제하면 apachectl로 아파치데몬을 stop 시킬 수 없다.
# rm -f /usr/local/apache2/logs/httpd.pid
# apachectl stop
/usr/bin/apachectl stop: httpd (no pid file) not running
# netstat -nltp | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 30008/httpd
# ps aux | grep httpd | grep root
root 30008 0.0 0.6 6344 3440 ? Ss 01:52 0:00 /usr/local/apache/bin/httpd
root 30098 0.0 0.0 1944 484 pts/2 R+ 01:59 0:00 grep httpd
PidFile /usr/local/apache/logs/httpd.pid
# echo 30008 > /usr/local/apache/logs/httpd.pid
# apachectl stop
'아파치 (Apache )' 카테고리의 다른 글
apache-jboss연동 tomcat connector(mod_jk) (0) | 2016.02.22 |
---|---|
아파치 오류"could not determine the server's.." (0) | 2016.02.22 |
윈도우 apache2-openssl 설정 (1) | 2016.01.14 |
웹서버 특정 ip 차단 및 허용 [tomcat, 톰캣, apache, 아파치] (0) | 2015.12.25 |
[아파치 보안 인증키 처리 방법] (0) | 2015.12.25 |