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

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,818
7년 전 조회 1,652
7년 전 조회 1,849
7년 전 조회 1.1만
7년 전 조회 1,914
7년 전 조회 2,051
7년 전 조회 1,897
7년 전 조회 2,226
7년 전 조회 1,724
7년 전 조회 1,904
7년 전 조회 2,099
7년 전 조회 2,344
7년 전 조회 1,659
7년 전 조회 1,745
7년 전 조회 2,243
7년 전 조회 1,724
7년 전 조회 2,167
7년 전 조회 3,375
7년 전 조회 5,609
7년 전 조회 1,933
7년 전 조회 2,112
7년 전 조회 3,236
8년 전 조회 2,280
8년 전 조회 1,897
8년 전 조회 1,910
8년 전 조회 1,829
8년 전 조회 1,913
8년 전 조회 1,655
8년 전 조회 2,660
8년 전 조회 2,611