ghost博客的nginx配置问题

搭建了ghost博客,配了nginx:

server {  
    listen 80;
    server_name y500.me;
    location / {
        proxy_pass         http://127.0.0.1:2368;
        proxy_redirect off;
    }
}

这样本来没有什么问题,那天突然心血来潮,加了个首页,然后呢就想把博客配到子目录/ghost去,怎么配都配不成功,后来看了forever的日志才发现不能用ghost做目录:

Error: ghost subdirectory not allowed  
    at ConfigManager.validate (/usr/share/nginx/html/ghost/core/server/config/index.js:355:31)
    at /usr/share/nginx/html/ghost/core/server/config/index.js:265:29
    at tryCatcher (/usr/share/nginx/html/ghost/node_modules/bluebird/js/main/util.js:24:31)
    at Promise._settlePromiseFromHandler (/usr/share/nginx/html/ghost/node_modules/bluebird/js/main/promise.js:454:31)
    at Promise._settlePromiseAt (/usr/share/nginx/html/ghost/node_modules/bluebird/js/main/promise.js:530:18)
    at Promise._settlePromiseAtPostResolution (/usr/share/nginx/html/ghost/node_modules/bluebird/js/main/promise.js:224:10)
    at Async._drainQueue (/usr/share/nginx/html/ghost/node_modules/bluebird/js/main/async.js:182:12)
    at Async._drainQueues (/usr/share/nginx/html/ghost/node_modules/bluebird/js/main/async.js:187:10)
    at Async.drainQueues (/usr/share/nginx/html/ghost/node_modules/bluebird/js/main/async.js:15:14)
    at process._tickDomainCallback (node.js:459:13)

error: Forever detected script exited with code: 0  
error: Script restart attempt #79  

然后果断改成blog,在配置一下就好了,现在nginx配置:

server {  
    listen 80;
    server_name y500.me;

   location  / {
       root     /usr/share/nginx/html/tools/;
       index    index.html index.js;

   }

   location ^~ /blog {
        proxy_set_header   X-Real-IP $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Host      $http_host;
        proxy_set_header X-NginX-Proxy true;
        proxy_pass         http://127.0.0.1:2368;
        proxy_redirect off;
   }