What is the difference between Web server and HTTP server?
On the hardware side, a web server is a computer that stores web server software and a website’s component files. An HTTP server is software that understands URLs (web addresses) and HTTP (the protocol your browser uses to view webpages).
What is a server side API?
A server-side web API is a programmatic interface consisting of one or more publicly exposed endpoints to a defined request–response message system, typically expressed in JSON or XML, which is exposed via the web—most commonly by means of an HTTP-based web server.
Is it OK to split a REST API server from a web server?
As long as proper controls are set on the API endpoint (HTTPS, HSTS, etc.), you should be good to go. One thing to note here is that the myservice.org may be running on a hardened system and with additional protections (such as a WAF ). In that case, those controls will have to be applied to api.myservice.org as well.
Can a REST API server proxie a web server?
You can configure that web server application to have /api path proxied to your API server that you don’t even have to directly exposed to the public (like you mentioned in one of your comments on other answers) as long as it can be reachable by the server for the Web app. Thanks for contributing an answer to Information Security Stack Exchange!
Can you use different servers for the same API?
You can use different servers and code-bases for the API even if it is simply under a different path on the same domain. A server needs to provide the special header to allow requests like you describe, as they violate the same origin policy ( Access-Control-Allow-Origin ).
Can a JavaScript spa be run on a web server?
Regarding on how to do that, since your Web app is just a Javascript SPA, its server is just running a web server application (e.g. Apache, NGINX etc) that serves the app files.