子域重定向到站点根目录中安装的Ghost博客

时间:2014-12-24 01:13:05

标签: node.js subdomain cpanel ghost-blog

我的网站根目录中安装了Ghost,而子域中安装了另一个实例。 Ghost安装了Softaculous,这两个实例都正常工作。 (单独的数据库和ghost实例。)

但是,其他子域现在返回一个鬼页面404而不是显示其内容。

我的文件结构如下:

public_html
  ├── subdomain                 - This displays the ghost 404 page from my root installation    
  │   ├── index.html            - I want it to display this index.html file
  │   └── assets             
  ├── ghost subdomain           - This is working correctly
  │   ├── content
  │   ├── core            
  │   └── etc                
  ├── content
  ├── core
  ├── config.js
  ├── Gruntfile.js
  └── etc

我的主网站的config.js文件制作设置如下:

    production: {
    url: 'http://courtneyspurgeon.com',
    mail: { removed }
    },
    database: {
        client: 'mysql',
        connection: {
    host: 'localhost'
    user: 'removed'
    password: 'removed'
    database: 'removed'
    charset: 'utf8',
    insecureAuth: true,
    socketPath: '/tmp/mysql.sock',
        },
        debug: false
    },
    server: {
        // Host to be passed to node's `net.Server#listen()`
        host: '0.0.0.0',
        // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
        port: '65506'
    }
},

我怀疑我需要更改服务器设置,或以某种方式限制部分内容,但我不确定如何。

如果有帮助,我的主要网站是:http://courtneyspurgeon.com/(运行幽灵)

一个不起作用的子域名示例:http://blog.courtneyspurgeon.com/(不运行ghost,但返回父站点的404内容。)

即使您没有具体的答案,我也欢迎有关我应该查看哪些文件或设置的建议。

1 个答案:

答案 0 :(得分:1)

您应该查看一下Apache配置文件。您需要为courtneyspurgeon.com配置一个配置文件,该配置文件将流量定向到Ghost,另一个配置文件正在blog.courtneyspurgeon.com上监听,该流量将流量定向到public_html / subdomain / index.html。现在,听起来Apache没有被告知它需要以不同的方式处理你的courtneyspurgeon.com和blog.courtneyspurgeon.com流量。

如果您使用的是Ubuntu,我可以查看/ etc / apache2 / sites-available /和/etc/apache2/apache2.conf。如果您在CentOS上,请查看/ etc / httpd / sites-available和/etc/httpd/httpd.conf。

相关问题