How can I share my Web App URL with other computers without having a denied connection by localhost?
15 次查看(过去 30 天)
显示 更早的评论
I'm trying to develop a Matlab Web App (it's my first time) that reads some data from Arduino Due (connected via USB to my laptop). My aim is to share this Web App with other users with a different computer and make them possibile to visualize the same data I visualize on my laptop. Once I have added my app to the MAtlab Web App Server Home Page, I am able to open the web app on my laptop and everytihing seems to work, but when I share the URL of the Web Server Home Page or of the Web App with other devices it comes out "connection denied by localhost" - ERR_CONNECTION_REFUSED.
I would be very grateful if someone can help me solving this out!
Thanks in advance.
0 个评论
回答(1 个)
Chetan
2023-12-27
I understand that you've developed a MATLAB Web App that communicates with an Arduino Due and encountering difficulties in sharing the app with other users due to a "connection denied by localhost" or "ERR_CONNECTION_REFUSED" error.
This typically indicates that the server is not configured to accept remote connections.
To enable other users on different computers to access the MATLAB Web App, you'll need to do the following:
1. Configure the Server for Remote Access:
Edit the MATLAB Web App Server configuration file to listen on all network interfaces. This is done by setting the hostname to '0.0.0.0' instead of 'localhost' or '127.0.0.1'.
2. Update Firewall Settings:
Modify the firewall settings to allow incoming connections on the port that the MATLAB Web App Server uses (which by default is 9988).
3. Use the Correct URL:
Instead of using 'localhost', share the URL containing your computer's external IP address with other users.
4. Set Up Port Forwarding:
If the computer is behind a router, you'll need to set up port forwarding to route incoming traffic to your machine.
5. Restart the Server:
After making changes to the server configuration, ensure you restart the MATLAB Web App Server for the changes to take effect.
For more details, refer to the MATLAB documentation on Web Apps:
Hope it helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Web App Server 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!