使用hexo搭建博客 nginx代理nodejs

假设hexo已经搭建完成,并且hexo server可以正常运行

nginx下站点配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
upstream node_app {
server 127.0.0.1:4000;
}
server {
listen 80;
server_name blog.wangchunjian.win;
location / {
proxy_pass http://node_app;
}
location ~* .(gif|jpg|jpeg|png|css|js|ico)$ {
root /www/web/nodejs/test/public;
expires 1h;
}
}

Read More