Answer the question
In order to leave comments, you need to log in
How to set up PHP via fastCGI/Nginx in ubuntu server 14.04 in virtualbox with access forwarding from host machine?
We have Host machine Xubuntu 14.04 in it Virtualbox 4.3.10 in which ubuntu server 14.04 is raised. Two hosts are forwarded to the guest one, the first through NAT, which is created by default by virtualbox, the second is static, forwarded according to the instructions yapro.ru/web-master/unix/virtualbox-statichniy-ip.html .
There is access via ssh from the host to the guest. Next, Nginx + fastCGI is configured in the guest. Access to fastCGI goes through the port, listen = 127.0.0.1:9000 is written in pool.d/www.conf, in the nginx config:
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param DOCUMENT_ROOT /var/www/site.local;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
recv() failed (104: Connection reset by peer) while reading response header from upstream, client
Answer the question
In order to leave comments, you need to log in
You need to configure the network via host-only so that the guest machine will ping from the host. Then you can directly access the IP of the guest machine from the host browser.
php has nothing to do with it. You only need to reach nginx, everything else is already working within the virtual machine. If you want to use xdebug remotely, again, there is no problem if you have set up a network.
Configure Nginx according to the manual from the official site. The virtual machine can be configured in different ways. For example, hang it on a bridge and forward ports with a firewall from a host or router to this virtual machine. Here, however, the details are lacking.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question