채택완료

아파치설정 문의드립니다.

2019-02-25 (월) 17:10:46 3,581

<VirtualHost *:80>

   ServerAlias aaa.ac.kr

   ServerName aaa.ac.kr

   ServerAdmin [email protected]

   DocumentRoot /user/aaa/public_html/

   <FilesMatch "\.(avi|mpe?g|zip|asf|exe|rar|wmv|wma)$">

       Order Deny,Allow

       Allow from env=link_allow

       Deny from all

   </FilesMatch>

   ErrorLog logs/aaa.ac.kr-error_log

   CustomLog logs/aaa.ac.kr-access_log common

   SetEnvIfNoCase Request_URI (gif|png|jpg|css|js|bmp|jpeg|swf)$ IMAGE=1

</VirtualHost>

위에 처럼 아파치 설정을 하였는데...

aaa.ac.kr/adm 이렇게 주소로 들어가면 403에러가 나옵니다.

퍼미션은 다바꿔봤구요

index.php를 인식못하는건지..

아파치 설정을 다시해줘야할가요?

혹시 <FilesMatch "\.(cgi|pl|php|htm|html)$"> 이렇게 바꾸면 될까요?

|

답변 3개 / 댓글 3개

채택된 답변
+20 포인트

/usr/local/apache/conf/mod_security.conf 에서 SecRuleEngine 을 검색 하셔서

DetectionOnly 또는 Off 로 설정하시고 아파치를 리스타드 해보세요.

mod_security 방침에 맞지 않아서 에러가 나는 모양 입니다.

딱히 문제될것은 보이지 않네요. 

conf 파일만 가지고 어디가 문제가 있다고 진단은 어려울듯 싶네요.

서버 작업을 다시 할 예정 이라면 https://sir.kr/so_server/2362 여기를 참고 하세요.

답변에 대한 댓글 3개

<FilesMatch "\.(cgi|pl|php|htm|html)$"> 이 부분은 뭔지 알수있을가요?
cgi|pl|php|htm|html 해당 파일의 과 매치 되는지 확인 하는 문구로 본문에 있는
<FilesMatch "\.(avi|mpe?g|zip|asf|exe|rar|wmv|wma)$"> 는 외부에 링크 되는걸 막는 구문 입니다.

httpd.conf 파일을 올려주시면 살펴 봐 드릴께요.
[Wed Feb 27 11:06:46 2019] [error] [client 59.30.232.195] ModSecurity: Access denied with code 403 (phase 2). Pattern match "=(http|https|ftp)\\:/" at REQUEST_URI. [file "/usr/local/apache/conf/mod_security.conf"] [line "40"] [msg "PHP Injection Attacks"] [hostname "multimajor.kangwon.ac.kr"] [uri "/bbs/login.php"] [unique_id "XHXwtn8AAAEAAHzUDxUAAAAH"]
[Wed Feb 27 11:06:46 2019] [error] [client 59.30.232.195] File does not exist: /user/multimajor/public_html/message, referer: http://multimajor.kangwon.ac.kr/adm/
[Wed Feb 27 11:07:09 2019] [error] [client 59.30.232.195] ModSecurity: Access denied with code 403 (phase 2). Pattern match "=(http|https|ftp)\\:/" at REQUEST_URI. [file "/usr/local/apache/conf/mod_security.conf"] [line "40"] [msg "PHP Injection Attacks"] [hostname "multimajor.kangwon.ac.kr"] [uri "/bbs/login.php"] [unique_id "XHXwzX8AAAEAAHyAv1oAAAAD"]
[Wed Feb 27 11:07:09 2019] [error] [client 59.30.232.195] File does not exist: /user/multimajor/public_html/message

위와같은 에러가 에러로그에 쌓여있는데 어떤문제일까요?

index 설정이 안되서 그런것은 아닐까요 ?

adm/index.php 로 들어 가면 접속 되시나요 ?

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