php로 실행될 확장자 추가하기
php파일로 해석될 확장자를 추가하기 위해서는 httpd.conf 파일을 찾아서 아래와 같이 추가해 주시면 됩니다.
AddType application/x-httpd-php .php3 .php .html .htm
AddType application/x-httpd-php 라는 구문이 처음부터 없는 경우에는 vi 에디터에서 /AddType으로 검색해서 AddType application/x-tar .tgz 라는 구문을 찾아 바로 밑에 위의 구문을 통째로 삽입해 주시면 됩니다.
참고로 httpd.conf 파일은 아파치를 소스로 컴파일하여 설치한 경우에는 /usr/local/apache/conf/ 디렉토리에 있고 rpm으로 설치한 경우라면 /etc/httpd/conf 디렉토리에 있습니다. 아니면 아래와 같이 find 명령어로 직접 찾을수도 있습니다.
find / -name httpd.conf
|
|
|