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
번호 분류 제목 날짜 조회 수
72 Server XE PC에서 모바일화면 출력방법 file 2016.09.08 2835
71 Server XE Request 줄이기 file 2016.09.07 1937
70 Server Apache에 대한 mod_proxy 지원 구성 2016.09.06 1800
69 Server [php.ini]XE 신디케이션 OpenSSL 오류문구 해결방법 file 2016.08.25 2797
68 Server innodb_use_sys_malloc to FALSE 2016.08.24 2637
67 Server innodb_use_sys_malloc에 따라 The InnoDB memory heap is disabled mysql error 메시지 1 2016.08.23 3793
66 Server XE file cache 활용 2016.08.19 1648
65 Server 아파치 mod_cache mod_disk_cache 알아보기 7 2016.08.18 3096
64 Server XE 반응형 모바일 메타태그 삽입하기 2016.08.14 3687
63 Server mysql 16CPU / 16GB My.cnf 1 2016.07.26 2475
62 Server mysql 테이블 손상시 #1146 - Table 해결방법 file 2016.07.17 8871
61 Server xe 타이틀 게시판 이름 없애기 file 2016.06.28 1802
60 Server 서버 부하상태 체크 file 2016.04.30 1709
59 Server XE Content font-size:수정방법 file 2016.04.19 1845
58 Server XE <title>제목 - 사이트명</title> 으로 변경방법 2016.04.19 2051
57 Server XE 리퍼러 모듈로 트래픽 발생에 대처방법 file 2016.04.17 1392
56 Server ECS P43T-AD3, Asus C381GM, Driver(두번째 사용했던 서버 드라이버) file 2016.04.12 2765
55 Server XE 스케치북 모바일 비회원 댓글쓰기에서 홈페이지 이메일 기입란 삭제하기 2016.04.08 2977
54 Server XE 어느날 갑자기 다운로드가 되지 않을때 해결방법 file 2016.04.07 1351
53 Server 윈도우 TCP 연결의 개수를 최대한 늘이기 2016.03.26 3357
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소