호스트에 WordPress를 두 개 이상 배포하려고합니다. 좋은 하위 도메인에 연결을 배포하기 위해 nginx를 사용합니다.하나의 호스트에 여러 개의 wordpress를 사용합니다.
WordPress와 MySQL을 서비스로 사용하여 첫 번째 컨테이너를 성공적으로 배포했습니다. 이 스크립트 :
version: '2'
services:
db3:
image: mysql:5.7
volumes:
- db_wp_lmt_data:/var/lib/mysql
restart: always
ports:
- 3308:3306
- 3308
environment:
MYSQL_ROOT_PASSWORD: FFFF
MYSQL_DATABASE: DDDD
MYSQL_USER: XXX
MYSQL_PASSWORD: YYYY
wordpress:
depends_on:
- db3
image: wordpress:latest
ports:
- "8003:80"
restart: always
environment:
WORDPRESS_DB_HOST: db3:3306
WORDPRESS_DB_USER: XXX
WORDPRESS_DB_PASSWORD: YYYY
VIRTUAL_HOST: ZZZZZ
volumes:
- wp_lmt_data:/var/www/html
volumes:
db_wp_lmt_data:
wp_lmt_data:
networks:
default:
external:
name: nginxproxy_default
는 그러나, 나는 (3009에 8004과 3308에 8003에서 포트를 변경 한 후) 같은 스크립트를 사용하여 두 번째 하나를 추가 할 때 좀 문제가 있어요. 외부에서 mysql 서버에 액세스 할 수 있지만 wordpress가 작동하지 않습니다. 내가 "curl -k localhost : 8004"호스트에서 할 때 다른 워드 프레스가 메인 페이지 내용을 반환하는 반면 아무것도 반환하지 않습니다.
왜 작동하지 않는지 이해하려고 노력하고 해결했습니다. 하지만 지금은 그것을 풀 수있는 방법이 없습니다.
db3_1 | 2017-12-27T23:50:45.558909Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db3_1 | 2017-12-27T23:50:45.597390Z 0 [Note] mysqld (mysqld 5.7.20) starting as process 1 ...
db3_1 | 2017-12-27T23:50:45.612731Z 0 [Note] InnoDB: PUNCH HOLE support available
db3_1 | 2017-12-27T23:50:45.612804Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db3_1 | 2017-12-27T23:50:45.612812Z 0 [Note] InnoDB: Uses event mutexes
db3_1 | 2017-12-27T23:50:45.612818Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
db3_1 | 2017-12-27T23:50:45.612824Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
db3_1 | 2017-12-27T23:50:45.612830Z 0 [Note] InnoDB: Using Linux native AIO
db3_1 | 2017-12-27T23:50:45.632121Z 0 [Note] InnoDB: Number of pools: 1
db3_1 | 2017-12-27T23:50:45.632384Z 0 [Note] InnoDB: Using CPU crc32 instructions
db3_1 | 2017-12-27T23:50:45.657365Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db3_1 | 2017-12-27T23:50:45.722114Z 0 [Note] InnoDB: Completed initialization of buffer pool
db3_1 | 2017-12-27T23:50:45.735602Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db3_1 | 2017-12-27T23:50:45.759510Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
db3_1 | 2017-12-27T23:50:45.798036Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db3_1 | 2017-12-27T23:50:45.798748Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db3_1 | 2017-12-27T23:50:45.873142Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db3_1 | 2017-12-27T23:50:45.874746Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
db3_1 | 2017-12-27T23:50:45.874819Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
db3_1 | 2017-12-27T23:50:45.876036Z 0 [Note] InnoDB: Waiting for purge to start
db3_1 | 2017-12-27T23:50:45.926379Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 12156537
db3_1 | 2017-12-27T23:50:45.928422Z 0 [Note] Plugin 'FEDERATED' is disabled.
db3_1 | 2017-12-27T23:50:45.932793Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db3_1 | 2017-12-27T23:50:45.968083Z 0 [Note] InnoDB: Buffer pool(s) load completed at 171227 23:50:45
db3_1 | 2017-12-27T23:50:45.969521Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
db3_1 | 2017-12-27T23:50:45.973412Z 0 [Warning] CA certificate ca.pem is self signed.
db3_1 | 2017-12-27T23:50:45.976434Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
db3_1 | 2017-12-27T23:50:45.981110Z 0 [Note] IPv6 is available.
db3_1 | 2017-12-27T23:50:45.981787Z 0 [Note] - '::' resolves to '::';
db3_1 | 2017-12-27T23:50:45.982192Z 0 [Note] Server socket created on IP: '::'.
db3_1 | 2017-12-27T23:50:45.989810Z 0 [Warning] 'user' entry '[email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:45.990490Z 0 [Warning] 'user' entry '[email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:45.990563Z 0 [Warning] 'user' entry '[email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:45.990660Z 0 [Warning] 'db' entry 'performance_schema [email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:45.990738Z 0 [Warning] 'db' entry 'sys [email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:45.990805Z 0 [Warning] 'proxies_priv' entry '@ [email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:45.996112Z 0 [Warning] 'tables_priv' entry 'user [email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:45.996739Z 0 [Warning] 'tables_priv' entry 'sys_config [email protected]' ignored in --skip-name-resolve mode.
db3_1 | 2017-12-27T23:50:46.021269Z 0 [Note] Event Scheduler: Loaded 0 events
db3_1 | 2017-12-27T23:50:46.022382Z 0 [Note] mysqld: ready for connections.
db3_1 | Version: '5.7.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)
db3_1 | 2017-12-27T23:50:46.022476Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.
db3_1 | 2017-12-27T23:50:46.022543Z 0 [Note] Beginning of list of non-natively partitioned tables
db3_1 | 2017-12-27T23:50:46.069871Z 0 [Note] End of list of non-natively partitioned tables
wordpress_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.6. Set the 'ServerName' directive globally to suppress this message
wordpress_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.6. Set the 'ServerName' directive globally to suppress this message
wordpress_1 | [Wed Dec 27 23:50:46.370813 2017] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.0 configured -- resuming normal operations
wordpress_1 | [Wed Dec 27 23:50:46.374367 2017] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'