[완료]특정 폴더에서 php실행 막기

pjm0616의 이미지
3205
points
0
points

ubuntu edgy에서 apache2와 php5를 사용하고 있습니다.
특정 폴더(하위 폴더 포함) 안에서 php실행을 막으려면 어떻게 해야 되나요?

bushi의 이미지
6263
points

바른 길이 있는지는

0
points

바른 길이 있는지는 잘 모르겠고,
rewrite 를 사용해서 엄한 html 로 돌려버리는 꽁수가 생각합니다.

pjm0616의 이미지
3205
points

RewriteRule ^/test/.*\.php$

0
points

RewriteRule ^/test/.*\.php$ - [F]
가 맞는 건가요?
a2enmod rewrite
하고 설정에
RewriteEngine On
RewriteRule ^/test/.*\.php$ - [F]
를 넣었는데 안되네요.
이것 말고도 rewrite가 다 안되는것 같습니다.
phpinfo에는 Loaded Modules에 mod_rewrite가 있고
http://ubuntuforums.org/archive/index.php/t-7304.html
이거보고 /etc/apache2/sites-enabled/000-default의
안에(DocumentRoot)
AllowOverride All로 바꾸고 apache재시작했는데 계속 안되네요.

RemoveType을 이용하면 되지 않을까요?

0
points

.htaccess 안에 해당 디렉토리 설정을 해 놓고

RemoveType .php
를 이용하시면 될 듯 합니다

송효진의 이미지
14949
points

.htaccess 에는

0
points

.htaccess 에는 그냥
php_value engine 0 하시면 됩니다.

emerge money
http://wiki.kldp.org/wiki.php/GentooInstallSimple - 명령어도 몇개 안되요~

김정균의 이미지
9811
points

httpd.conf

0
points

httpd.conf 에서

<Directory /path>
    <IfModule mod_php5.c>
        php_admin_flag engine off
    </IfModule>
</Directory>

와 같이 설정하시면 됩니다.

pjm0616의 이미지
3205
points

감사합니다.

0
points

감사합니다. httpd.conf에 php_value engine 0을 넣고 apache재시작하니까 되네요.

댓글 보기 옵션

원하시는 댓글 전시 방법을 선택한 다음 "설정 저장"을 누르셔서 적용하십시오.