제가쓰는 아파치설정입니다.

SetEnvIf Request_URI \.gif image-request
SetEnvIf Request_URI \.jpg image-request
SetEnvIf Request_URI \.png image-request
SetEnvIf Request_URI \.ico image-request
SetEnvIf Request_URI \.js image-request
SetEnvIf Request_URI \.css image-request
SetEnvIf Remote_Addr "::1" image-request
SetEnvIf Remote_Addr "127\.0\.0\.1" image-request
 

# 그누보드 데이터 경로 php 실행방지
<directory /home/*/www/data>
        AllowOverride None
        php_admin_flag engine off
    php_flag engine off
    <FilesMatch "\.(cgi|pl|php|htm|html)$">
    Order allow,deny
    Deny from all
    </FilesMatch>
</Directory>

# 워드프레스 데이터 경로 php 실행방지
<directory /home/*/www/wp-content/uploads>
        AllowOverride None
        php_admin_flag engine off
    php_flag engine off
    <FilesMatch "\.(cgi|pl|php|htm|html)$">
    Order allow,deny
    Deny from all
    </FilesMatch>
</Directory>
 

 

 

각 폴더처리는 이렇습니다.
<VirtualHost *:80>
        DocumentRoot /home/aaa/www
        ServerName aaa.co.kr
        ServerAlias www.aaa.co.kr
        php_admin_value open_basedir /home/aaa/www:/home/*/tmp
        php_admin_value upload_tmp_dir /home/aaa/tmp
        ErrorLog ${APACHE_LOG_DIR}/aaa.error.log
        CustomLog ${APACHE_LOG_DIR}/aaa.access.log combined env=!image-request
</VirtualHost>

 

|

댓글 1개

서버관련해서 정말 배우고 싶네여
댓글을 작성하시려면 로그인이 필요합니다.

서버관리자

서버관리자 모임 게시판 입니다.

+
제목 글쓴이 날짜 조회
7년 전 조회 1,930
7년 전 조회 1,758
7년 전 조회 1,952
7년 전 조회 1.1만
7년 전 조회 2,027
7년 전 조회 2,157
7년 전 조회 1,996
7년 전 조회 2,354
8년 전 조회 1,835
8년 전 조회 2,009
8년 전 조회 2,207
8년 전 조회 2,462
8년 전 조회 1,767
8년 전 조회 1,849
8년 전 조회 2,337
8년 전 조회 1,822
8년 전 조회 2,267
8년 전 조회 3,486
8년 전 조회 5,733
8년 전 조회 2,048
8년 전 조회 2,229
8년 전 조회 3,347
8년 전 조회 2,393
8년 전 조회 2,003
8년 전 조회 2,019
8년 전 조회 1,949
8년 전 조회 2,034
8년 전 조회 1,769
8년 전 조회 2,767
8년 전 조회 2,718