Closed mgrsskls closed 3 years ago
This is already possible (but not through phabalicious, but using multibasebox/ haproxy-config)
Add the environment-variable VPATH to your docker-compose.yml as in this example:
version: "2"
services:
web:
image: factorial/drupal-docker:php-74
volumes:
- .:/var/www:cached
environment:
VHOST: $VHOST
VPATH: /xxx # <-- traffic to this path will be remapped from /xxx/bla to /bla and forwarded into that container
...
The current version of haproxy-config will report a statuscode 200 for requests to VHOST (it displays basically the dashboard) But we can change that
created a ticket here https://github.com/factorial-io/haproxy-config/issues/10
When a website should be served from a subfolder (e.g. https://example.com/project) we solved this locally by creating a symlink (in Laravel projects:
public/project -> .
). This works fine andhttp://project.test/project
serves all assets correctly, buthttp://project.test
serves them as well. What happened to us was that we had a bug which caused the assets to be served byhttp://project.test
which we did not notice (only noticeable by having a detailed look at the request in the devtools). Instead we thought they would be served byhttp://project.test/project
and everything worked correctly.Therefore having the option to serve a website and all of its assets from a subfolder and returning a 404 for all requests from the parent folders would be cool!