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 •
로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
557 컴퓨터잡담 인터넷 익스플로러 개발자도구 해제 시키는 방법 file 2013.05.19 22398
556 Server Apache & Mysql 셋팅방법(httpd-mpm.conf / my.ini) 2013.05.13 13707
555 컴퓨터잡담 Windows에서 4GB 메모리 인식시키기(설정방법) 2013.05.11 9765
554 컴퓨터잡담 Full HD Digital TV 1080i 와 1080p 차이점 file 2013.05.10 13237
553 컴퓨터잡담 무선 인터넷의 속도와 품질 이해 file 2013.04.27 9024
552 컴퓨터잡담 안드로이드 동영상 재생시 파란색 물음표 박스만 나올때 조치방법 2 file 2013.04.26 39278
551 컴퓨터잡담 IP공유기 각사별 초기세팅값 2013.04.20 6320
550 Server PHP Proxy 가져오기 2 2013.04.20 14180
549 컴퓨터잡담 텍스트를 한글로 읽어주는 사이트 1 file 2013.04.18 9525
548 Server Google Chart API 이용하기 11 file 2013.04.10 20867
547 WindowsTip html) Google Charts API 활용 그래프 만들기 2013.04.08 9611
546 Server Proxy and hide ip address problem 1 1 2013.04.03 11999
545 Server 아파치 성능테스트 프로그램 1 file 2013.04.03 14033
544 Server 웹 페이지에 HTML5 동영상 컨트롤 추가 10 2013.04.02 9457
543 Server PHP) Example #1 HTML 엔티티 디코딩 13 2013.04.02 10179
542 Server php) curl_setopt의 옵션 1 10 2013.04.02 12937
541 Server make ping with PHP(핑테스트) 11 2013.04.01 11141
540 WindowsTip Windows ARP Spoofing 10 file 2013.03.29 11929
539 WindowsTip 네트워크에 있는 다른 시스템과 ip 주소가 충돌합니다. 1 file 2013.03.29 38111
538 컴퓨터잡담 은행,방송사 악성코드??? 업무만 보는데 바이러스가 걸리나? 2013.03.23 4609
Board Pagination Prev 1 ... 17 18 19 20 21 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소