我有一个停靠的Nginx代理,它位于我的服务器上。
我的一个网站是Docker Compose Wordpress网站。它们是单独的容器,必须保持这种状态。
When I update my Site Url in the Settings I can still log into my Admin Dashboard, but I cannot reach my actual site. I receive a 502 Gateway Error from Nginx.
Nginx服务器块:
server{
listen 80;
server_name test.com;
client_max_body_size 2M;
location / {
proxy_pass http://XXX.XXX.XXX.XXX:8001;
}
}
Wordpress docker撰写。yml:
version: \'2\'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
wordpress:
depends_on:
- db
build: ./wordpress
ports:
- "8001:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: password
volumes:
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ./php.ini:/usr/local/etc/php/conf.d/php.ini
volumes:
db_data: