hashover-next
hashover-next copied to clipboard
Failed to load hashover 2.0 with Ghost + Nginx
Dear jacobwb: I'm trying to run hashover together with ghost + nginx. Current ghost works fine with nginx. while I try to use hashover, at first, I place the '/hashover' in the ghost folder, bowser failed to find the hashover.js. So I try to use nginx to proxy the hashover folder, so that ghost will find the files. And to have php runs, I also add the php in nginx conf as following.
server {
listen 443;
listen 80;
server_name xxxxx.net;
ssl on;
ssl_certificate x.crt;
ssl_certificate_key x.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
error_page 497 https://$host$uri$args;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location /hashover/ {
root /var/www/;
rewrite ^/hashover/(.*)$ /hashover/$1 break;
}
location ~\.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
I renamed the hashover.js to test.js for test. Since hashover.js will be failed to load with extra '/' in the back.
And so from the log, hashover-javascript.php is been loaded. But why the comment is not shown?
Maybe there are some issues show the same problem
Hello, sorry for the long delay.
Please try again with the latest code, and if you are still having this problem, let me know and I will try my best to address the issue or help you configure your setup.