Apache/2.4.38 (Debian) Server at localhost Port 80

I am facing this issue on the localhost when i try to access it on browser it show me this


Also i tried to change the port to 81 in .yml file i still get the same issue.

1 Like

Hi @raheel, can you paste your entire docker-compose.yml file?

version: ‘3’

services:

db:

image: postgres:12

volumes:

  - './db:/var/lib/postgresql/data'

ports:

  - '5432:5432'

environment:

  POSTGRES_USER: farm

  POSTGRES_PASSWORD: farm

  POSTGRES_DB: farm

www:

depends_on:

  - db

image: farmos/farmos:2.x-dev

volumes:

  - './www:/opt/drupal'

ports:

  - '80:80'

environment:

  XDEBUG_MODE: debug

  XDEBUG_CONFIG: client_host=172.17.0.1

  # Enable these for PHPStorm:

  #XDEBUG_SESSION: PHPSTORM

  #PHP_IDE_CONFIG: serverName=localhost

Enable this service when executing javascript tests.

chrome:

image: selenium/standalone-chrome:latest

i have disabled the application which was using port 80, also i tried 81:80 still getting the same issue.

What operating system are you running Docker on?

I wonder if it is a permissions issue with the www directory that is being bind-mounted into the container.

It strikes me as similar to the issue that @gmagnusson encountered in Hosting with Docker - #6 by mstenta

I am running docker on Windows 10, with virtualization on in BIOS.

1 Like

I don’t have experience running Docker with bind-mounted volumes on Windows. I would assume it can handle the permissions properly, but maybe that’s not the case.

One way to test if this is the issue or not is to remove the following lines from your docker-compose.yml file and try installing farmOS again (BUT READ MY WARNING BELOW):

volumes:
  - './www:/opt/drupal'

WARNING: without these lines, as soon as you shut down your Docker container you will lose everything and have to start fresh. Those lines ensure that data persists outside of the Docker container, which is considered ephemeral.