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

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,742
7년 전 조회 1,577
7년 전 조회 1,771
7년 전 조회 1.1만
7년 전 조회 1,837
7년 전 조회 1,977
7년 전 조회 1,831
7년 전 조회 2,163
7년 전 조회 1,643
7년 전 조회 1,824
7년 전 조회 2,030
7년 전 조회 2,277
7년 전 조회 1,570
7년 전 조회 1,667
7년 전 조회 2,182
7년 전 조회 1,649
7년 전 조회 2,089
7년 전 조회 3,292
7년 전 조회 5,515
7년 전 조회 1,859
7년 전 조회 2,039
7년 전 조회 3,166
7년 전 조회 2,212
7년 전 조회 1,828
7년 전 조회 1,854
7년 전 조회 1,739
8년 전 조회 1,841
8년 전 조회 1,581
8년 전 조회 2,582
8년 전 조회 2,539
🐛 버그신고