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!