T
T
tripcollor2019-05-14 07:59:58
Nginx
tripcollor, 2019-05-14 07:59:58

How to setup virtualbox on windows 10 host machine, ubuntu guest for LEMP web development?

I installed nginx in the guest machine and php-fpm did all the settings, forwarded the ports.
I also put it in the guest folder /var/www/index.php, sent nginx there, the site started up both on the guest and on the host machine.
Next, I created a shared folder so that I can develop conveniently. I added a user to the
vboxsf group with the following command: sudo adduser USER_NAME vboxsf
The shared folder appeared, everything is fine, but when I write the path to it in nginx, the site displays a 404 error. the command creates a second identical directory /media/sf_nginx and after rebooting it must be run again. Although this is how the nginx server sees the files in the shared folder. How to make it okay?
sudo mount -t vboxsf nginx /media/sf_nginx

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanovskiy, 2019-05-14
@tripcollor

Write this to /etc/fstab

<sharename> </path/to/local/folder> vboxsf defaults 0 0

P
Pavel Belyaev, 2019-05-14
@PavelBelyaev

I always share it through a network folder (samba), although I deploy the environment on hyper-v, it has a 10 gigabit network and the network folder is local in terms of speed. In windows 10, there is also an NFS client, but it worked unstable for me then, but it was still on build 1709, it can be fixed now, but Samba works just perfect, for 4 years now I have been working like I switched from poppy to Windows ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question