0

I use Drupal VM and I have to change the folder from {{ drupal_composer_install_dir }}/web to {{ drupal_composer_install_dir }}/public.

When I do it and I run vagrant up, I get this error.

An exception occurred during task execution. To see the full traceback, use -vvv.
The error was: OSError: [Errno 2] No such file or directory: '/var/www/jb-inflatables/public'
fatal: [jb-inflatables]: FAILED! => {"changed": false, "failed_when_result": true, "module_stderr": "Traceback (most recent call last):
File \"/home/vagrant/.ansible/tmp/ansible-tmp-1560461183.6-73909259621121/AnsiballZ_command.py\", line 114, in <module>
_ansiballz_main()
File "/home/vagrant/.ansible/tmp/ansible-tmp-1560461183.6-73909259621121/AnsiballZ_command.py", line 106, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/vagrant/.ansible/tmp/ansible-tmp-1560461183.6-73909259621121/AnsiballZ_command.py\", line 49, in invoke_module
imp.load_module('main', mod, module, MOD_DESC)
File "/tmp/ansible_command_payload_KaNSZF/main.py", line 327, in <module>
File "/tmp/ansible_command_payload_KaNSZF/main.py", line 263, in main
OSError: [Errno 2] No such file or directory: '/var/www/jb-inflatables/public', "module_stdout": "", "msg": "MODULE FAILURE See stdout/stderr for the exact error", "rc": 1

How do I have to change the config.yml file so that Drupal is installed in /public instead of /web?

  • What error are you getting? Did you happen to make those changes in your config.yml after running vagrant up? You may need to run vagrant destroy && vagrant up and let it rebuild. Or maybe just vagrant provision. You should just need drupal_core_path: "/your/path/to/public" in your config.yml to override the default.config.yml directory. – Prestosaurus Jun 13 at 21:14
  • @Prestosaurus yes I did first vagrant destroy and then removed all the files etc and then I did vagrant up again. I just changed /web to /public? I added the error above... – meez Jun 13 at 21:31
0

You should be able to create a symbolic link to web called public. ln -s web public Your server will find the contents of web/ inside of public/ and vagrant will find what it needs in web.

0

The default drupal-vm setup use drupal-composer/drupal-project which use /web directory.

If you need another directory for your dependencies (e.g. /public_html, public), you have to make a composer setup (composer init) without drupal-composer/drupal-project. See this page for more information.

Then you can choose the folder structure yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.