Search code examples
ghost-blog

Ghost Blog Error: var ghost = require('./core');


I have a Ghost blog installed on shared hosting. I can access the blog by going to blog.my-domain.com:2368.

I want the blog to work when I go to http://blog.my-site.com/ but that doesn't work. This is the page I see:

// # Ghost bootloader
// Orchestrates the loading of Ghost
// When run from command line.

var ghost = require('./core');

ghost();

How do I fix this error?


Solution

  • I discovered a solution. As it turns out port 80 was already being used. This is why it wouldn't work. I had to create a .htaccess file to solve the problem:

    Options +FollowSymLinks -MultiViews  
    # Turn mod_rewrite on
    RewriteEngine On  
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^blog.example.com$ [NC]  
    RewriteCond %{HTTPS} off  
    RewriteRule ^ http://blog.example.com:2368%{REQUEST_URI} [P,QSA,L]  
    

    You replace blog.example.com with your URL for your Ghost Blog.

    Source of Information