@realcaseyrollins yes, this is called virtual hosting. Two ways to do it: you can inspect the Host header in the HTTP request, or if you have different IP addresses (it's possible to have multiple addresses for a single machine) for the two domains, you can decide which files to serve based on the address at which the request arrived.
No worries! I'll expand a little bit.
When you navigate to a webpage (`http://mywebsite.com/index.html` for instance), your browser:
(1) sends a DNS query to discover to which IP address(es) `mywebsite.com` resolves; let's suppose it receives `1.2.3.4` in response, and
(2) sends an HTTP request to `1.2.3.4` containing (a) an HTTP method: `GET`, (b) the name of the resource: `/index.html`, (c) the HTTP version: `HTTP/1.1`, and (d) the name of the site it wants: `Host: mywebsite.com`. It also probably sends some other information like the user agent, referrer, etc., but `Host` is the only *mandatory* header.
So now let's suppose you own `mywebsite.com` and you also want to run a site on the same machine at `beta.mywebsite.com`. You've configured your server so that when it receives the request described above, it responds with the file located at `/www/index.html`, and you want it to instead serve `/www-beta/index.html` when the user navigates to `http://beta.mywebsite.com/index.html`. You have to make both steps work.
First, you need an IP address at which you'll serve the beta site. This can be the same as the one you use for the main site, since they resolve to the same machine, but it doesn't have to be - a single computer can have multiple IP addresses and there's pros and cons to each approach. You'll then need your registrar to create a record so that when someone looks up `beta.mywebsite.com` they get the IP address.
Second, you need to instruct your server how to respond when it receives the request for `/index.html`. If you got a second IP address (let's imagine it's `4.3.2.1`) for your beta site, you have two options: you can configure your machine to serve `/www/index.html` to requests arriving at `1.2.3.4` and `/www-beta/index.html` to requests arriving at `4.3.2.1`, or you can set it up to serve `/www/index.html` to requests with the header `Host: mywebsite.com` and `/www-beta/index.html` to requests with `Host: beta.mywebsite.com`. Of course, if you are reusing the same IP address, both requests will arrive at `1.2.3.4` and you only have the second method available to you.
Some links for how you'd go about configuring an Apache server according to both methods:
https://httpd.apache.org/docs/2.4/vhosts/ip-based.html
https://httpd.apache.org/docs/2.4/vhosts/name-based.html
@khird Ah okay! That doesn't sound like something that'd be too hard to configure
@khird I hate that this is ever so slightly over my head