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
번호 분류 제목 날짜 조회 수
92 Server 8기가 램에 맞는 Mysql config 셋팅 값 1 2016.02.22 3856
91 Server Apache & Mysql 셋팅방법(httpd-mpm.conf / my.ini) 2013.05.13 13707
90 Server APACHE PHP 에러 잡기 1 2016.03.23 9916
89 Server Apache에 대한 mod_proxy 지원 구성 2016.09.06 1800
88 Server APMSETUP7 PHP 업그레이드 2015.06.02 6351
87 Server asp,jsp,php 아이피(ip) 가져오기/확인 file 2013.01.05 11867
86 Server CSS, JS파일, gzip으로 한꺼번에 압축해서 전송하기 2016.03.08 1247
85 Server ECS P43T-AD3, Asus C381GM, Driver(두번째 사용했던 서버 드라이버) file 2016.04.12 2765
84 Server FileZilla FTP SERVER 패시브모드 셋팅방법 file 2016.12.22 8761
83 Server Google Chart API 이용하기 11 file 2013.04.10 20867
82 Server HP XW6600 E5430 SPEC file 2016.11.06 4731
81 Server html) 프레임 나누기 4 2013.03.02 10196
80 Server innodb_use_sys_malloc to FALSE 2016.08.24 2637
79 Server innodb_use_sys_malloc에 따라 The InnoDB memory heap is disabled mysql error 메시지 1 2016.08.23 3793
78 Server jQuery CDN 2016.09.11 4298
77 Server make ping with PHP(핑테스트) 11 2013.04.01 11141
» Server Minify로 CSS, JS파일, gzip으로 한꺼번에 압축해서 전송하기 file 2016.11.27 4337
75 Server MySQL - 속도저하에 따른 웹페이지 접속 지연 2016.03.03 1301
74 Server mysql 16CPU / 16GB My.cnf 1 2016.07.26 2475
73 Server MySQL 5.6 my.cnf 글로벌 변수인지 세션변수인지 확인 2016.03.24 1527
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소