You are not logged in.
I need to host several sites on the same server/IP, for example:
* api.mydomain.com → API service
* www.mydomain.com → website
Each must run in its own mORMot binary/process (not in one app).
Questions:
* Is it possible for two mORMot processes to both listen on port 80/443 and be split by hostname?
* On Windows/http.sys (THttpApiServer): can I register different hostnames so each process handles its own domain?
If reverse proxy is the only option:
Any mORMot-specific notes for X-Forwarded-For, TLS offload, HTTP/2, or WebSockets?
Goal:
* One IP address
* Separate binaries per site
* Clean HTTPS setup (Let’s Encrypt etc.)
What’s the recommended approach?
Offline
Thanks @ab. I need to think about it, because that means in the end I’d be replacing my current IIS + ISAPI setup with an NGINX + mORMot setup. I’m not sure it would really be less complex. The goal was to have a single binary for each of my website that I could just deploy to get the website running (plus configuring the firewall, of course).
Offline
Another thumbs up for nginx, also just this week they announced ACME support so it will be even easier then ever to auto renew ssl certificates (such as LetsEncrypt).
Offline
If you want a single binary, you could also do all this with a single mORMot HTTP server.
Your website is full static (no php), right?
On Windows, you can use the mORMot http.sys server, which are able to share the same port with several mORMot binaries.
Then you need to register each domain using e.g.
netsh http add urlacl url=http://main.domain.com:80/ user=Everyone
netsh http add urlacl url=http://domain.com:80/ user=Everyone
Just ask grok for this standard behavior - but it is almost the same as how IIS works, because http.sys is also used by IIS.
Offline
Another thumbs up, nginx is the way to go
Offline
Thanks @AB, yes i do not use any php. I will study http.sys with mORMot thanks a lot !
Offline
Another thumbs up for nginx, also just this week they announced ACME support so it will be even easier then ever to auto renew ssl certificates (such as LetsEncrypt).
Another thumbs up, nginx is the way to go
Yes, but NGINX isn’t really designed for Windows, and even its own developers do not recommend running it there.
(see: https://nginx.org/en/docs/windows.html
: “high performance and scalability should not be expected”).
That’s why I’m still wondering: is it really a good idea to replace IIS + ISAPI with NGINX (limited on Windows) + mORMot?
Last edited by loki (Yesterday 18:34:53)
Offline
i use nginx on windows server for my customer with wildcard ssl certificate to host an react-native web application and couple of api services written with mormot with no issues. it's not designed for windows yes, but still usable for reverse-proxy. i don't know what your setup is and how much work will it need but for my own company, i installed an ubuntu server+nginx that handles requests and reverse-proxy them to my other windows servers using iss+isapi at the back-end and don't expose them to internet directly. I believe it's more secure this way.
Last edited by koraycayiroglu (Yesterday 20:43:38)
Offline