Testing locally with MAMP works but cannot get expected results on CircleCI

I have a Codeigniter install and developed locally with MAMP Pro. I have included behat tests which have working ok locally. I am trying to get a circleci config that will work like my local setup works.

My behat.yml file is as follows:

default:
    extensions:
        Behat\MinkExtension:
            base_url: "http://www.usetiltdev.com/"
            sessions:
                default:
                    goutte: ~

And my circleci config file:

version: 2

jobs:
  build:
    docker:
      - image: circleci/php:7.2-apache-browsers

    working_directory: ~/app

    steps:
      - checkout

      #install php extensions needed
      - run: sudo apt install -y libpng-dev
      - run: sudo docker-php-ext-install gd

      #config apache
      - run: sudo chmod 777 /etc/apache2/sites-enabled
      - run: ls -la
      - run: ls -la /etc/apache2/sites-enabled
      - run: sudo cp design/environment/circleci/site_test.conf /etc/apache2/sites-available/usetiltdev.conf
      - run: sudo a2ensite usetiltdev
      - run: sudo service apache2 restart
      - run: echo 127.0.0.1 usetiltdev.com | sudo tee -a /etc/hosts
      - run: echo 127.0.0.1 www.usetiltdev.com | sudo tee -a /etc/hosts
      - run: cat /etc/hosts

      #install composer dependecies
      - run: composer install

      # run tests!
      - run: vendor/bin/behat

Lastly here is an example of the test that works locally but not on circleci:

When I am on "/contact/"
And I fill in "name" with "Joe Bloggs"
    // I get the following error
    Form field with id|name|label|value|placeholder "name" not found. (Behat\Mink\Exception\ElementNotFoundException)

No that didn’t work. This is the error I am getting 37

And this is it working ok locally. I think it must be my config setup. However any tests on a simple view page does work ok. Its only when forms are being interacted with

Am I? I thought what I have in my usetiltdev.conf would fix that. Or am I completely wrong here.

<VirtualHost *:80>
    ServerAdmin dev@usetilt.com
    ServerName usetiltdev.com
    ServerAlias www.usetiltdev.com
    DocumentRoot /var/www/www.usetiltdev.com/public_html
</VirtualHost>

Cross-posted to Stack Overflow.