dockerでwordpressのプロジェクトを立ち上げたら
ブラウザ上で403 Forbiddenが出力されるエラーについて困っております。
docker-compose.yml
version: '3.6' services: wp: image: wordpress:${WORDPRESS_VERSION:-php7.3-fpm} build: context: . dockerfile: docker/Dockerfile container_name: wp volumes: - ./config/php.conf.ini:/usr/local/etc/php - ./wordpress/teenz:/var/www/html/teenz - ./.env:/var/www/.env - ./logs/xdebug:/var/log/xdebug environment: - WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME:-wordpress} - WORDPRESS_TABLE_PREFIX=${WORDPRESS_TABLE_PREFIX:-wp_} - WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-mysql} - WORDPRESS_DB_USER=${WORDPRESS_DB_USER:-wordpress} - WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-wordpress} depends_on: - mysql restart: always mysql: image: mysql:5.7 volumes: - ./tmp/mysql:/var/lib/mysql restart: always ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress nginx: image: nginx:${NGINX_VERSION:-latest} container_name: nginx ports: - '80:80' # - '443:443' volumes: - ${NGINX_CONF_DIR:-./nginx}:/etc/nginx/conf.d - ${NGINX_LOG_DIR:-./logs/nginx}:/var/log/nginx - ${WORDPRESS_DATA_DIR:-./wordpress}:/var/www/html # - ${SSL_CERTS_DIR:-./certs}:/etc/letsencrypt # - ${SSL_CERTS_DATA_DIR:-./certs-data}:/data/letsencrypt depends_on: - wp restart: always adminer: image: adminer restart: always links: - mysql ports: - 8080:8080
docker/Dockerfile
FROM wordpress:${WORDPRESS_VERSION:-php7.3-fpm} RUN apt-get update && \ # pecl install xdebug && \ docker-php-ext-enable xdebug RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
ビルド中は全く問題なく終わり
コンテナも無事起動されたんですがなぜか繋がりません
#エラーログ
error.log 2020/07/28 09:39:27 [error] 28#28: *4 directory index of "/var/www/html/" is forbidden, client: 172.24.0.1, server: 127.0.0.1, request: "GET / HTTP/1.1", host: "localhost" acces.log 172.24.0.1 - - [28/Jul/2020:09:39:27 +0000] "GET / HTTP/1.1" 403 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"
#気になること
localhost:8080に接続するとなぜか
adminerのログイン画面の方には繋がります。
抽象的な質問で恐れ入りますが
お詳しい方がいましたらよろしくお願いします。