
Apache/2.2.22
on을 사용하여 실행되는 웹 서버가 있습니다 Debian/7.8
.
오류 페이지 끝에 추가되는 서명을 비활성화하고 싶습니다.
Not Found
The requested URL /sdffds.html was not found on this server.
_____________________________
Apache/2.2.22 (Debian) Server at xxx Port 80 <-- this
파일 을 편집하여 이 작업을 수행할 수 있어야 합니다 /etc/apache2/conf.d/security
. 나는 주석을 제거 ServerSignature Off
하고 주석을 달아서 그렇게 했습니다 ServerSignature On
. 그러나 apache2를 다시 로드/다시 시작한 후에는 작동하지 않습니다.
확인해 보니 apache2.conf
지침이 Include conf.d/
여기에 있습니다. 이는 apache2가 파일을 제대로 보지 않거나 conf.d
편집에 실수를 했다는 의미입니다 conf.d/security
.
확실히 편집 apache2.conf
해서 넣었는데 Include conf.d/security
작동합니다.
Apache2가 파일을 제대로 찾지 못하는 이유는 무엇입니까 conf.d/
?
답변1
저는 Apache가 conf.d 디렉토리에서 ".conf"로 끝나는 파일만 선택한다고 확신합니다.
..conf.d/security를 ..conf.d/security.conf로 변경해 보십시오.
또는 기본 구성 파일에 "ServerSignature Off"를 추가하면 제대로 작동합니다.
답변2
실제로 Include conf.d/
는 conf.d/
. 파일 ServerSignature Off
에 설정한 후에도 동일한 문제에 직면했는데 그 이유는 내부에 (포함 ) 이라는 security
원본 보안 파일의 백업이 있었기 때문입니다 . 따라서 충돌을 일으킬 수 있는 다른 파일이 없는지 확인해야 합니다 . 내 경우에는 로드 후에 설정이 무시되었기 때문입니다. Jacob Margason이 제공하는 솔루션은 끝에 추가하면 모든 것이 무시되므로 문제도 해결됩니다.conf.d/
security.bak
ServerSignature On
conf.d/
security.bak
security
ServerSignature Off
apache2.conf