【问题标题】:Subdomains re-directing to Ghost Blog installed in site root重定向到安装在站点根目录中的 Ghost 博客的子域
【发布时间】:2014-12-24 01:13:05
【问题描述】:

我的站点根目录中安装了Ghost,并在子域中安装了另一个实例。 Ghost 与 Softaculous 一起安装,并且这两个实例都正常工作。 (单独的数据库和幽灵实例。)

但是,其他子域现在会返回幽灵 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 内容。)

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

【问题讨论】:

  • 试试驱魔,听说可以驱鬼:P

标签: node.js subdomain cpanel ghost-blog


【解决方案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。

【讨论】:

    猜你喜欢
    • 2018-03-08
    • 1970-01-01
    • 1970-01-01
    • 2016-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-23
    相关资源
    最近更新 更多