V
V
Veronika Stepanovna2020-06-24 15:35:25
PHP
Veronika Stepanovna, 2020-06-24 15:35:25

How to raise a project to vagrant from a custom image?

In general, you need to raise the project to php7.3.
I originally used box bento/ubuntu-16.04but there is php7.0. Attempts to change to php7.3 were unsuccessful, I received 502. I
gave up this business and took a ready-made box with php7.3.
Now I get an empty Apache page. It's not strange, it's /var/www/htmlempty.
I changed synchronized_folder to this

config.vm.synced_folder './', '/var/www/html', owner: 'vagrant', group: 'vagrant'
but the folder is empty. Please tell me how to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergey, 2020-06-24
@sargss

after the changes , by the
vagrant reload --provision
way, I recommend a separate line for each directory

config.vm.synced_folder './', '/vagrant'
  config.vm.synced_folder './data', '/var/www/html', owner: 'vagrant', group: 'vagrant'

and you should not expect that when the Windows host that
the sink folder on the guest will belong to vagrant, it will most likely be root;
- it says in
https://www.vagrantup.com/docs/synced-folders/basi...
Some synced folder types do not support modifying the owner.
vagrant ssh -- 'ls -ld /vagrant /var/www/html'

drwxrwxrwx    1 root     root          4096 Jun 24 17:41 /vagrant
drwxrwxrwx    1 root     root             0 Jun 24 17:35 /var/www/html

vagrant ssh -- 'ls /var/www/html'
index.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question