Here is my posts.hbs related to this plugin on the ghost side:
74 <a id="nodebb/comments"></a>
75 <script type="text/javascript">
76 var nbb = {};
77 nbb.url = 'z0z0.me/comments'; // EDIT THIS
78
79 (function() {
80 nbb.articleID = '{{../post.id}}'; nbb.title = '{{../post.title}}';
81 nbb.tags = [{{#../post.tags}}"{{name}}",{{/../post.tags}}];
82 nbb.script = document.createElement('script'); nbb.script.type = 'text/javascript'; nbb.script.async = true;
83 nbb.script.src = nbb.url + '/plugins/nodebb-plugin-blog-comments/lib/ghost.js';
84 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb.script);
85 })();
86 </script>
87 <script id="nbb-markdown" type="text/markdown">{{{../post.markdown}}}</script>
88 <noscript>Please enable JavaScript to view comments</noscript>
and here is the nginx config related to this:
location ^~ /comments {
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
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://comments_upstream;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}