[Semibug] OpenBSD Shared Hosting

Josh Grosse josh at jggimi.net
Sun Jul 30 19:57:58 EDT 2023


On Sun, Jul 30, 2023 at 08:57:19AM -0600, Jonathan Drews wrote:
> ...Now by shared hosting I mean one bare metal OpenBSD with one IP address but 
> two separate websites....
> 
> I do not expect you guys to write an explanation of how to do this. Just
> point me to a book or website that explains it. 

Most web server software can serve multiple websites that happen to share the 
same IP address. Often called "virtual servers," but the naming convention
of the feature may vary.  OpenBSD's httpd(8) can do this by allowing the
admin to provision multiple `server name{}` and/or `server match name{}`
structures, which share the same `listen` configuration. 

1. Provision multiple domain names that share the same IP address.
   This is often done with DNS Canonical Name ("CNAME") provisioning.

2. Use your web server's software to configure each server.  For httpd(8),
   there is an example of this in the httpd.conf(5) man page
   where two server configurations, for www.a.example.com and www.b.example.com,
   both listen to port 80 on 203.0.113.1.



More information about the Semibug mailing list