-
Notifications
You must be signed in to change notification settings - Fork 218
HTTPWebserver
If your project's id is [project_id] and the service is serving on [port], and it is serving to all ip addresses (not just localhost!), then use
https://cocalc.com/[project_id]/server/[port]/
to access your HTTP web server.
CAVEAT: If the webserver directs the client to make additional requests to the backend for absolute URL's, e.g., the service serves a file index.html like this:
<a href='/index.html'>HOME!</a>
then when you click on the link, your browser will try to grab
https://cocalc.com/index.html
instead of
https://cocalc.com/[project_id]/server/[port]/index.html
Obviously, this can't possibly work.
Many webservers, e.g., tensorboard, work fine and do not do this. Other's won't work with modification.
This is similar to above, except you use
https://cocalc.com/[project_id]/port/[port]/
When you visit that URL with your web browser, your web server will get a request for /[project_id]/port/[port]/
rather than for /
like it does with server. Otherwise, everything is the same, including the big caveat above.
Only collaborators on the given project can access the webserver. Our proxy server will reject all other requests. This means you don't have to worry about setting up logins/passwords on whatever webserver you run in your project. On the other hand, it means that CoCalc is not useful as a platform if you want to run a webserver that is visible to anybody in the world. If you need that, use some other service.
Obviously, it would be nice if we could map a project_id and port to a subdomain like
https://foo.cocalc.com
We have not implemented this.
This Wiki is for CoCalc.com.
A more structured documentation is the CoCalc User Manual.
For further questions, please contact us.