How can I access a Matlab web app from another computer?

10 次查看(过去 30 天)
I have developed a Matlab web app through the app designer tool and have published it through the Matlab web server application. Although I can access the file through the link generated http://hostname:9988/webapps/home/session.html?app=app1 on my PC (same PC as the server), I cannot access it from a different computer (not even in the same network). Does anyone know how I can generate a link that I can share with people outside my network? I am trying to avoid using Matlab Production Server if possible.

回答(5 个)

Nozhan Hosseini
Nozhan Hosseini 2020-1-6
I have the same problem. It should be really sad that this is only for local use. MATLAB please answer
  1 个评论
Søren Furbo
Søren Furbo 2020-6-23
Have you tested whether the computer accepts incoming traffic on port 9988? IIRC, it is usually blocked by Windows firewall.

请先登录,再进行评论。


Cris LaPierre
Cris LaPierre 2019-2-10
You don't need MPS, but you do need the web app server. Have you reviewed the installation and configuration doc pages?
Instructions for creating a deploying a web app can be found here.
Instructions on how to run a web app can be found here. Make sure the web app server is running and is accessible on your network.
  3 个评论
Cris LaPierre
Cris LaPierre 2019-2-10
编辑:Cris LaPierre 2020-1-8
I don't know the technical details. However, web apps are not designed to run on the open internet. From the documentation:
"Web apps are designed to run only within a trusted intranet environment, not in the open Internet."
If you have a current license, I'd suggest contacting technical support about getting info to run on your network. They can provide much more accurate information than I can.
Hassan
Hassan 2020-4-14
Dear Athanasios Kolios,
Unfortunately, Matlab is a VERY BAD platform for web applications in general and in particular for internet deployed apps. I am facing the same problem, and I approach the technical support to solve this issue. Eventually, they managed to make a shareable link to the outer world. Sorry, I can't share my link as it is under revision.
Soon, after solving the link issue problem, you will face additional problems with speed, memory, maintenance and other issues that should be super trivial for web applications, such as maps and so. I contacted the local support of MathWorks, Europ engineers.. no answer. They just start telling me stories about things that they can do and ignoring my core questions.. waste of time.
My tip is to leave Matlab and invest your time in another tool for web applications. Although you will have a slow start, you will enjoy the benefits of it in the future.
Best, HM

请先登录,再进行评论。


abdulrahman al-sabaawi
hellow dear
have solved this problem?

Walter Roberson
Walter Roberson 2020-1-7
The URLs that you get with web apps are not inherently restricted to the local environment: it is just somewhat risky to expose them to the Internet.
The URLs that are generated reflect the local host name. If your host has a different external name, just edit the hostname part of the URL appropriately. I do not know at the moment whether the app will output the same hostname as the request was made for, so it is plausible that the index might not be directly usable if the external name does not match the internal name.
The URLs that are generated reflect the local port number. The network security must be configured to permit external access to that port on that host. It is acceptable for the network to perform Port Address Translation to accept a request on a different port number and forward it to the appropriate local port, but it is unlikely that the index will know to do appropriate rewriting.
In the case where the internal and external hostnames match and the internal and external port numbers match, then all you should have to do is (A) permit access to the port; (B) tell outside people what URL to use; and (C ) sit back and watch as your system gets hacked because you used str2num() and someone decides to type in a command in place of a number.

Søren Furbo
Søren Furbo 2020-6-23
编辑:Søren Furbo 2020-6-23
You need to replace "hostname" with either the IP address of the server or a recognized alias, and the server needs to accept incoming messages for port 9988.
By default, (IIRC), "hostname" is "localhost", which only works locally on the computer that is acting as web app server.
It is also very likely that your Windows firewall blocks port 9988, and that you network does as well.
As others have remarked, you need to secure the server, preferably by mkaing sure that the port 9988 is only accessible from your local network. If you don't, anyone on the internet can run your app, and if there are any security issues (which are very easy to make by accident), you risk exposing the entire computer to them.

类别

Help CenterFile Exchange 中查找有关 Web Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by