Phone cannot access 8000 port, need to set up to access 8000 port, direct input native IP is able to access the default port, but cannot access 8000, including other, I have UFW allow 8000/tcp or not. including require local comment off also not, with the Lampp,ubuntu system, laravel for the backstage
Reply content:
Phone cannot access 8000 port, need to set up to access 8000 port, direct input native IP is able to access the default port, but cannot access 8000, including other, I have UFW allow 8000/tcp or not. including require local comment off also not, with the Lampp,ubuntu system, laravel for the backstage
Run the following Laravel command:php artisan serve --host=0.0.0.0 --port=8000
Ubuntu default firewall is off, so it doesn't matter with the firewall. For the difference between localhost (127.0.0.1) and 0.0.0.0, see: What ' s the difference between 127.0.0.1 and 0.0.0.0?
Update:
Mobile phone access, you need to access the PC side of the LAN ip+ port (through the ifconfig Command view), such as: 192.168.1.102:8000
In this case, the phone and the computer are not in the same intranet, or start 8000 service is 127.0.0.1:8000 instead of 0.0.0.0:8000
Does localhost build a website that is not port 80 by default? You want to access port 8000 your configuration Apache Ah, mobile phone and computer network section is the same
I'm drunk, too! Mobile Access to localhost:8000? Don't you tease me, okay? You got a server on your phone? Or do I understand that your computer has a service that can be accessed with localhost:8000, resulting in a phone that cannot be accessed? The phone needs to be in the same intranet as the computer, and the firewall settings of the PC are no problem, and the computer's intranet Ip:port access.
Not host.
Put your nginx configuration file and host and the address to visit to see
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.