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
번호 분류 제목 날짜 조회 수
27 Server FileZilla FTP SERVER 패시브모드 셋팅방법 file 2016.12.22 8775
26 Server PuTTY Download Page(telnet,ftp,ssh) file 2016.12.06 5508
25 Server V2824 User Manual 1 file 2016.12.06 11714
24 Server XE 스케치북 게시판 웹진형에서 사진과 요약글 출력방법 file 2016.12.05 5203
23 Server Server 성능 테스트 secret 2016.11.30 585
22 Server 웹서버에서의 램디스크 엄청난 효과 비교하기 file 2016.11.27 4951
21 컴퓨터잡담 크롬 캐시파일 삭제방법(Chrome cache file delete) file 2016.11.27 2708
» Server Minify로 CSS, JS파일, gzip으로 한꺼번에 압축해서 전송하기 file 2016.11.27 4337
19 Server 램드라이브를 이용한 mysql 번개속도로 개선방법 file 2016.11.27 5238
18 Server [mysql] Created tmp disk tables 디스크 쓰기방지 대안 1 2016.11.26 5159
17 Server 슈퍼캐시에서 .htaccess 이부분 제거해야 하나? 2016.11.23 4524
16 Server HP XW6600 E5430 SPEC file 2016.11.06 4731
15 Server XpressEngine 최적화 기진곰님의 슈퍼캐시 테스트 file 2016.09.19 5015
14 Server 윈도우용 MEMcached 설치방법 1 file 2016.09.17 5178
13 Excel 엑셀 암호변경 제거 방법 file 2016.09.12 6349
12 Server XE PC에서 모바일화면 출력방법 file 2016.09.08 2835
11 WindowsTip vcruntime140.dll / vcomp140.dll / vcamp140.dll 오류해결법 2016.09.06 6839
10 WindowsTip Visual Studio 2015용 Visual C++ 재배포 설치 오류 해결방법 3 file 2016.09.06 15433
9 Server [php.ini]XE 신디케이션 OpenSSL 오류문구 해결방법 file 2016.08.25 2816
8 WindowsTip 윈도우 CPU 사용률 확인, 실시간 저장하기 2016.08.24 5685
Board Pagination Prev 1 2 Next
/ 2

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소