Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can I host multiple sites in it? Like I have a VPS, but I have 4 sites in it, can I just pack it to 1 binary file?


You can. Just create a folder for each hostname. Here's how redbean handles virtual hosting. If a request comes in for http://foo.bar/baz.html then redbean looks for the asset `foo.bar/baz.html` and if it doesn't exist then redbean looks for `baz.html`. This virtual hosting feature also works if redbean is used as an HTTP proxy. One thing I'm slowly but steadily doing is creating a gigantic redbean containing a painstakingly restored archive.org snapshot of the web circa 1999, with a Lua script for AltaVista, and then configuring FireFox to use it as a proxy so I can surf the old web.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: