Skip to content
조회 수 4337 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부

Minify로 CSS, JS파일, gzip으로 한꺼번에 압축해서 전송하기

minify tmp folder location re.png


 
1. http://code.google.com/p/minify/ 에서 minify 최신버전을 다운받습니다.

2. 압축을 해제한 후, min/config.php 파일을 수정합니다.
//$min_cachePath = '/tmp'; 라는 부분을 찾아
앞에 주석처리 // 부분을 지우고 /tmp를 ./cache로 수정합니다.
$min_cachePath = './cache';

Update for you:

Example using WAMP server on windows:

example.com is at: d:/www/example.com

minify folder: d:/www/example.com/htdocs/static/utils/min (note: you can also have min under example.com/htdocs/min, it is just how I prefer it)

in min/config.php I have this:

$min_allowDebugFlag = false;
$min_errorLogger = false;
$min_enableBuilder = false;

$min_cachePath = 'd:/www/example.com/cache/minify';

$min_documentRoot = '';
$min_cacheFileLocking = true;
$min_serveOptions['bubbleCssImports'] = false;
$min_serveOptions['maxAge'] = 31556926;
$min_serveOptions['minApp']['groupsOnly'] = false;
$min_serveOptions['minApp']['maxFiles'] = 10;

So basically I set it relative to the site root, not to the server's own tmp directory.




3. FTP로 min폴더만 업로드합니다.
XE설치 폴더에 상관없이 무조건 루트에 업로드합니다.
ex) XE가 www/xe/에 설치되어 있어도 www/min/
      XE가 www/에 설치되어 있어도 www/min/

4. 업로드 한 뒤에 min/cache 폴더를 만들어 퍼미션을 707로 줍니다.

5. XE 설치 디렉토리에 있는 .htaccess 파일을 수정합니다.

6. 아래의 2가지 경우중 해당되는 구문을 .htaccess 파일의 맨 아랫줄에 추가합니다.
- XE 설치경로가 /xe/ 로 사용되는 경우
RewriteRule ^(.*\.(css|js))$ ../min/index.php?f=xe/$1 [L]

- XE 설치경로가 루트디렉토리인 경우
RewriteRule ^(.*\.(css|js))$ /min/index.php?f=$1 [L]

7. 완료되었습니다.
제대로 설치됐는지 확인하시려면 사이트에 다시 들어간 다음,
min/cache 폴더에 파일들이 생성되어 있으면 성공하였습니다.


#Minify #CSS #JS #gzip #urin79
TAG •
로그인 후 댓글쓰기가 가능합니다.

?

  1. 19
    May 2013
    13:20

    인터넷 익스플로러 개발자도구 해제 시키는 방법

    Category컴퓨터잡담 Views22398
    Read More
  2. 13
    May 2013
    08:11

    Apache & Mysql 셋팅방법(httpd-mpm.conf / my.ini)

    CategoryServer Views13707
    Read More
  3. 11
    May 2013
    11:14

    Windows에서 4GB 메모리 인식시키기(설정방법)

    Category컴퓨터잡담 Views9765
    Read More
  4. 10
    May 2013
    18:48

    Full HD Digital TV 1080i 와 1080p 차이점

    Category컴퓨터잡담 Views13237
    Read More
  5. 27
    Apr 2013
    09:25

    무선 인터넷의 속도와 품질 이해

    Category컴퓨터잡담 Views9024
    Read More
  6. 26
    Apr 2013
    08:35

    안드로이드 동영상 재생시 파란색 물음표 박스만 나올때 조치방법

    Category컴퓨터잡담 Views39278
    Read More
  7. 20
    Apr 2013
    09:24

    IP공유기 각사별 초기세팅값

    Category컴퓨터잡담 Views6320
    Read More
  8. 20
    Apr 2013
    08:08

    PHP Proxy 가져오기

    CategoryServer Views14180
    Read More
  9. 18
    Apr 2013
    14:27

    텍스트를 한글로 읽어주는 사이트

    Category컴퓨터잡담 Views9525
    Read More
  10. 10
    Apr 2013
    08:11

    Google Chart API 이용하기

    CategoryServer Views20867
    Read More
  11. 08
    Apr 2013
    18:30

    html) Google Charts API 활용 그래프 만들기

    CategoryWindowsTip Views9611
    Read More
  12. 03
    Apr 2013
    18:52

    Proxy and hide ip address problem

    CategoryServer Views11999
    Read More
  13. 03
    Apr 2013
    18:38

    아파치 성능테스트 프로그램

    CategoryServer Views14033
    Read More
  14. 02
    Apr 2013
    14:39

    웹 페이지에 HTML5 동영상 컨트롤 추가

    CategoryServer Views9456
    Read More
  15. 02
    Apr 2013
    12:10

    PHP) Example #1 HTML 엔티티 디코딩

    CategoryServer Views10179
    Read More
  16. 02
    Apr 2013
    07:16

    php) curl_setopt의 옵션

    CategoryServer Views12937
    Read More
  17. 01
    Apr 2013
    18:39

    make ping with PHP(핑테스트)

    CategoryServer Views11141
    Read More
  18. 29
    Mar 2013
    08:25

    Windows ARP Spoofing

    CategoryWindowsTip Views11929
    Read More
  19. 29
    Mar 2013
    08:22

    네트워크에 있는 다른 시스템과 ip 주소가 충돌합니다.

    CategoryWindowsTip Views38111
    Read More
  20. 23
    Mar 2013
    23:37

    은행,방송사 악성코드??? 업무만 보는데 바이러스가 걸리나?

    Category컴퓨터잡담 Views4609
    Read More
Board Pagination Prev 1 ... 17 18 19 20 21 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소