0

I'm trying to set up (Virtual Box + CentOS) with (nginx + PHP + MySql) on MacOS, the future I can coding on MacOS then throw file to the share folder with (Virtual Box + CentOS) and execute on (nginx + PHP + MySql).

But I have problem I can make browser on MacOS read the file direction, I do find the keyword like port forwarding but still not work.

I did below step to install

install CentOS and setting config
1. install CentOS minimal version
2. after installed CentOS, ifconfig eth0 dhclient eth0 ifconfig eth0
3. edit file
vi /etc/sysconfig/network-scripts/ifcfg-eth0
change some line

ONBOOT="yes"  
MM_Controlled="no"  
BOOTPROTO=dhcp  
  1. restart network service network restart

install (nginx + PHP + MySql)
5. https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-6

setting Port Forwarding
6. in VirtualBox app click Setting on toolbar > click Network > click Port Forwarding fill

Name >>>> Protocol >>>> Host IP >>>> Host Port >>>> Guest IP >>>> Guest Port  
CentOS >>>> TCP >>>> 170.20.10.2 >>>> 8080 >>>> 10.0.2.15 >>>> 80

after I type 170.20.10.2:8080/info.php nothing respond.
Did I miss something ??

enter image description here enter image description here enter image description here enter image description here

3
  • I see 170.20.10.2:1000/info.php in Safari. Are you sure it's not redirecting?
    – Nathan C
    Commented Apr 7, 2014 at 16:04
  • it only shows can't open the page … isn't responding Commented Apr 7, 2014 at 16:08
  • did I miss some steps? it just set in virtual box setting not need to do anything more? Commented Apr 7, 2014 at 16:20

1 Answer 1

0

Its working for me on these options :

Port forwarding settings

Browser photo :

Click here

1
  • Can you give a description of what's in the image as they can't always be ensured to exist in the future. Commented Jul 29, 2016 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .