Posted
Filed under 프로그래밍/PHP
Nibbleblog는 별도의 DB를 사용하지 않는다.
그래서 백업도 폴더를 그대로 복사하면된다.
가벼워서 라즈베리파이B 에서도 상당히 빠르게 돌아간다.

기본적으로 한글팩이 포함되어있지 않다.
cd languages
wget http://nblang.nibbleblog.com/download/thebe/language/ko_KR.bit

이 한글팩은 나온지 좀 됐지만 사용하기에 무리는 없다.
관리자 설정에사ㅓ 언어를 한국어로 변경해준다.

Nibbleblog 에서 짧은 주소(Friendly URLs)를 nginx에서 사용하려면
아래 설정을 추가하면 된다.

 location / {
  # First attempt to serve request as file, then
  # as directory, then fall back to displaying a 404.
  #try_files $uri $uri/ =404;
  try_files $uri $uri/ @rewrites;
 }

 location @rewrites {
  rewrite ^/category/([^/]+)page-([0-9+])$ /index.php?controller=blog&action=view&category=$1&number=$2 last;
  rewrite ^/category/([^/]+)/$ /index.php?controller=blog&action=view&category=$1&number=0 last;
  rewrite ^/tag/([^/]+)/page-([0-9]+)$ /index.php?controller=blog&action=view&tag=$1&number=$2 last;
  rewrite ^/tag/([^/]+)/$ /index.php?controller=blog&action=view&tag=$1&number=0 last;
  rewrite ^/page-([0-9]+)$ /index.php?controller=blog&action=view&number=$1 last;
  rewrite ^/post/([^/]+)/$ /index.php?controller=post&action=view&post=$1 last;
  rewrite ^/post-([0-9]+)/(.*)$ /index.php?controller=post&action=view&id_post=$1 last;
  rewrite ^/page/([^/]+)/$ /index.php?controller=page&action=view&page=$1 last;
  rewrite ^/feed/$ /feed.php last;
  rewrite ^/([^/]+)/$ /index.php?controller=page&action=$1 last;
 }


2015/11/06 12:34 2015/11/06 12:34