’johnwittle.com′ is registered and has its A record pointed at the server, so when you type johnwittle.com into your browser, it goes to 98.158.26.222 (the ip of the server).
Now, apache, the webserver, has the following in its configuration files:
<VirtualHost *:80> #look for connections coming in on port 80
ServerName dbaupp.johnwittle.com #if the requested URL is this url…
DocumentRoot /home/dbaupp/www #...use this directory as root
</VirtualHost>
Then you just set up a virtualhost block for every domain/subdomain you want.
the two lines i posted are the bare minimum needed to set a vhost. Things like 404 pages, per-vhost access and error logs, servername aliases (*.foo.com to www.foo.com), etc. are all possible.
Afaik, this is the standard method of going about doing this.
Is there only one IP addr? How would that work with multiple people trying to do web hosting?
Apache virtual hosts. For instance:
’johnwittle.com′ is registered and has its A record pointed at the server, so when you type johnwittle.com into your browser, it goes to 98.158.26.222 (the ip of the server).
Now, apache, the webserver, has the following in its configuration files:
Then you just set up a virtualhost block for every domain/subdomain you want.
and fcgi 404 handler or whatever would be set up similarly?
the two lines i posted are the bare minimum needed to set a vhost. Things like 404 pages, per-vhost access and error logs, servername aliases (*.foo.com to www.foo.com), etc. are all possible.
Afaik, this is the standard method of going about doing this.