Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 从流浪者箱外部无法通过流浪者获得蜂巢_Ubuntu_Zend Framework2_Vagrant_Laminas Api Tools - Fatal编程技术网

Ubuntu 从流浪者箱外部无法通过流浪者获得蜂巢

Ubuntu 从流浪者箱外部无法通过流浪者获得蜂巢,ubuntu,zend-framework2,vagrant,laminas-api-tools,Ubuntu,Zend Framework2,Vagrant,Laminas Api Tools,我使用Ubuntu流浪者通过Apigility制作API。 Apigility已安装并运行良好: $ sudo php -S 10.10.10.30:8888 -t public public/index.php PHP 5.6.4-1+deb.sury.org~trusty+1 Development Server started at Tue Jan 27 13:40:23 2015 Listening on http://10.10.10.30:8888 Document root is

我使用Ubuntu流浪者通过Apigility制作API。 Apigility已安装并运行良好:

$ sudo php -S 10.10.10.30:8888 -t public public/index.php
PHP 5.6.4-1+deb.sury.org~trusty+1 Development Server started at Tue Jan 27 13:40:23 2015
Listening on http://10.10.10.30:8888
Document root is /var/www/public
Press Ctrl-C to quit.
当我从vagrantbox内部执行wget时,Apigility会收到一个格式良好的html文件。当我从我的来宾系统(osX)浏览url()时,该站点无法访问

防火墙似乎也正常:

$ sudo netstat -tulpn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:46165           0.0.0.0:*               LISTEN      619/rpc.statd   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2371/sshd       
tcp        0      0 10.10.10.30:8888        0.0.0.0:*               LISTEN      5717/php        
tcp        0      0 0.0.0.0:1080            0.0.0.0:*               LISTEN      1062/mailcatcher
tcp        0      0 0.0.0.0:1025            0.0.0.0:*               LISTEN      1062/mailcatcher
tcp        0      0 0.0.0.0:59106           0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      1010/php-fpm.conf)
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1016/mysqld     
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      572/rpcbind     
tcp6       0      0 :::22                   :::*                    LISTEN      2371/sshd       
tcp6       0      0 :::443                  :::*                    LISTEN      1345/apache2    
tcp6       0      0 :::42974                :::*                    LISTEN      619/rpc.statd   
tcp6       0      0 :::39553                :::*                    LISTEN      -               
tcp6       0      0 :::111                  :::*                    LISTEN      572/rpcbind     
tcp6       0      0 :::80                   :::*                    LISTEN      1345/apache2    
udp        0      0 0.0.0.0:19413           0.0.0.0:*                           794/dhclient    
udp        0      0 0.0.0.0:741             0.0.0.0:*                           572/rpcbind     
udp        0      0 0.0.0.0:51436           0.0.0.0:*                           -               
udp        0      0 0.0.0.0:44542           0.0.0.0:*                           619/rpc.statd   
udp        0      0 127.0.0.1:795           0.0.0.0:*                           619/rpc.statd   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           794/dhclient    
udp        0      0 0.0.0.0:848             0.0.0.0:*                           -               
udp        0      0 0.0.0.0:111             0.0.0.0:*                           572/rpcbind     
udp        0      0 10.10.10.30:123         0.0.0.0:*                           2666/ntpd       
udp        0      0 10.0.2.15:123           0.0.0.0:*                           2666/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           2666/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           2666/ntpd       
udp6       0      0 :::741                  :::*                                572/rpcbind     
udp6       0      0 :::10482                :::*                                794/dhclient    
udp6       0      0 :::50958                :::*                                -               
udp6       0      0 :::111                  :::*                                572/rpcbind     
udp6       0      0 fe80::a00:27ff:fe3a:123 :::*                                2666/ntpd       
udp6       0      0 ::1:123                 :::*                                2666/ntpd       
udp6       0      0 :::123                  :::*                                2666/ntpd       
udp6       0      0 :::34952                :::*                                619/rpc.statd   

那么会出现什么问题?

您可以转发端口或创建专用网络: 在Vagrant文件中,您可以将此行添加到转发端口: config.vm.network“forwarded_port”,来宾:80,主机:81 在下面的行中,当访问“localhost:81”时,请求将转发到VM的端口80。 或者做一个私人的newotk: config.vm.network“专用_网络”,ip:“192.168.10.10” 在另一行中,来宾VM将通过IP 192.168.10.10访问,您可以访问它: 为了简化操作,您可以在系统的主机文件中添加一个条目: 192.168.10.10 myvm 和访问:

霍尔普:这有帮助