直接访问ghost可以,但是nginx没有代理

来源:6-3 compose实战

Qolome

2018-06-17 10:51

其他配置与同学们的一样

这是 ghost/config.json


{
    "url": "http://www.justginger.top:2368/",
    "server": {
        "port": 2368,
        "host": "0.0.0.0"
    },
    "database": {
        "client": "mysql",
        "connection": {
            "host": "db",
            "user": "ghost",
            "password": "ghost",
            "database": "ghost",
            "port": 3306,
            "charset": "utf8"
        }
    },
    "mail": {
        "transport": "Direct"
    },
    "logging": {
        "transports": [
            "file",
            "stdout"
        ]
    },
    "process": "systemd",
    "paths": {
        "contentPath": "/var/lib/ghost/content"
    }
}

这是 nginx.conf

worker_processes auto;
events {
        worker_connections 1024;
}
http {
        server {
                listen 80;
                location / {
                        proxy_pass http://ghost-app:2638;
                }
        }
}


写回答 关注

1回答

  • Qolome
    2018-06-17 10:56:03

    补充公网环境

Docker入门

再不学点Docker你就out啦!

97494 学习 · 250 问题

查看课程

相似问题