채택완료

아파치 서버 (centos)에서...error log 위치를 변경하려는데~~

2017-09-26 (화) 18:37:06 4,672

#

# ErrorLog: The location of the error log file.

# If you do not specify an ErrorLog directive within a <VirtualHost>

# container, error messages relating to that virtual host will be

# logged here.  If you *do* define an error logfile for a <VirtualHost>

# container, that host's errors will be logged there and not here.

#

ErrorLog logs/error_log




ErrorLog logs  기본값인데..
에러로그 생성이  /var/log/httpd 아래 생성됩니다. 

이 부분을 다른 위치로 변경하려면 어떻게 해야할까요?
|

답변 3개

채택된 답변
+20 포인트

/etc/httpd/ 에 들어가 보시면, logs 라는 심볼릭링크가 있을 것입니다. 

이 링크를 원하는 곳으로 변경해 보세요. 

2017-09-26 (화) 19:27:35

ErrorLog logs/error_log

=> 생성되야 하는경로를 모두 지정하시면 될거 같습니다.

예) /data/logs/error_log

ErrorLog /data/logs/error_log

#

# ErrorLog: The location of the error log file.

# If you do not specify an ErrorLog directive within a <VirtualHost>

# container, error messages relating to that virtual host will be

# logged here.  If you *do* define an error logfile for a <VirtualHost>

# container, that host's errors will be logged there and not here.

#

ErrorLog logs/error_log

VirtualHost 안에 ErrorLog 지시자를 지정하지 않을 경우

컨테이너는 이곳 (ErrorLog logs/error_log) 에 로깅함

이라고 설명하고 있습니다.


우선 주석 내용처럼 VirtualHost 에 따로 지정을 해서 그런것은 아닌지 확인해 보세요.

답변을 작성하려면 로그인이 필요합니다.