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

migrated from serverfault.com Apr 7 '14 at 15:45

This question came from our site for system and network administrators.

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

Its working for me on these options :

Port forwarding settings

Browser photo :

Click here

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

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.