-1

I need to change the docroot path that ddev sets up in the php container because I have some code that has already had an html folder in its source and bespoke include path determination is not working.

The code looks for the first occurrence of html to set a path to include files at another location. But because both the code and ddev php container have html, there are 2 occurrences of html in the path and the code now forms the path incorrectly. It's legacy code and the routine is done many times in the code so I'd rather not change each file to avoid larger pull request diffs.

I would like to change it from /var/www/html/ to /var/www/

Please can you advise.

therobyouknow
  • 6,604
  • 13
  • 56
  • 73
  • 1
    I don't recommend this, but you can probably just add another mount in a `docker-compose.mounts.yaml` ``` services: – rfay Jul 03 '23 at 12:41

1 Answers1

1

I don't recommend this, but you can probably just add another mount in a docker-compose.mounts.yaml

services:
  web:
    volumes:
    - ../:/var/something

Using /var/www will cause much pain because it will cause an overlap.

More detail in https://ddev.readthedocs.io/en/latest/users/extend/custom-compose-files/

therobyouknow
  • 6,604
  • 13
  • 56
  • 73
rfay
  • 9,963
  • 1
  • 47
  • 89
  • I tried this. I deleted my project first and reran ddev config. It said new folder not created and that it would create it. That's fine. But once site created I got "forbidden" in browser. – therobyouknow Jul 05 '23 at 09:23
  • Feature request raised here: https://github.com/ddev/ddev/issues/5081 – therobyouknow Jul 05 '23 at 09:42
  • 1
    For now I've changed the code to change back to a compatible path. I may settle with that. Thanks again for your input. – therobyouknow Jul 05 '23 at 12:45