Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sqlite 如何在一台服务器上托管多个ghost博客_Sqlite_Nginx_Centos_Ghost Blog - Fatal编程技术网

Sqlite 如何在一台服务器上托管多个ghost博客

Sqlite 如何在一台服务器上托管多个ghost博客,sqlite,nginx,centos,ghost-blog,Sqlite,Nginx,Centos,Ghost Blog,我有一个有两个域的液滴。 每个域都有一个子域,我试图在每个子域上设置两个ghost实例,但这给了我一个非常困难的时间 我有一个安装了LEMP堆栈的Centos服务器。 Ghost在第一个子域上运行很好,但是第二个子域我可以看到主页/前端的样式,但是当我访问/Ghost或/admin时,我没有发现nginx 404错误。如果没有nginx配置文件,很难回答,但我仍然会尝试,您需要配置nginx以侦听这些子域,如果您成功地做到了这一点,那么还需要在每个博客上配置ghostblog config.js

我有一个有两个域的液滴。 每个域都有一个子域,我试图在每个子域上设置两个ghost实例,但这给了我一个非常困难的时间

我有一个安装了LEMP堆栈的Centos服务器。
Ghost在第一个子域上运行很好,但是第二个子域我可以看到主页/前端的样式,但是当我访问/Ghost或/admin时,我没有发现nginx 404错误。

如果没有nginx配置文件,很难回答,但我仍然会尝试,您需要配置nginx以侦听这些子域,如果您成功地做到了这一点,那么还需要在每个博客上配置ghostblog config.js,使其具有不同的URL、端口和数据库

server {
     listen 80;
     server_name  blog1.example.com;

     location / {
             proxy_pass http://127.0.0.1:2368/;
             proxy_set_header   X-Real-IP $remote_addr;
             proxy_set_header   Host      $http_host;
     }
 }
server {
     listen 80;
     server_name  blog2.example.com;

     location / {
             proxy_pass http://127.0.0.1:2369/;
             proxy_set_header   X-Real-IP $remote_addr;
             proxy_set_header   Host      $http_host;
     }
 }
blog1.example.com config.js

production: {
        url: 'http://blog1.example.com',
        mail: {},
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost1.db')
            },
            debug: false
        },
        server: {
            host: '127.0.0.1',
            port: '2368'
        }
    }
production: {
        url: 'http://blog2.example.com',
        mail: {},
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost2.db')
            },
            debug: false
        },
        server: {
            host: '127.0.0.1',
            port: '2369'
        }
    }
blog2.example.com config.js

production: {
        url: 'http://blog1.example.com',
        mail: {},
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost1.db')
            },
            debug: false
        },
        server: {
            host: '127.0.0.1',
            port: '2368'
        }
    }
production: {
        url: 'http://blog2.example.com',
        mail: {},
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost2.db')
            },
            debug: false
        },
        server: {
            host: '127.0.0.1',
            port: '2369'
        }
    }

如果我回答了你的问题,请标记为完整