“While I'm waiting for my primary domain to transfer in I'm trying to do my homework on setting up 3 new clients website who will all keep their domains registered with their current provider but I will host their websites. Question: A(Host) record IP update, understood but how does my VPS know which folder to send each domain to?.. example: someone types www.example.com into their browser and they find their way to my IP address but then how will they find their way to the correct folder?”
“Once the domain has been pointed to your VPS's server you will need to configure your web server for the domain. Since the most common web server is Apache I will post a sample config:
Options Indexes FollowSymLinks
Require all granted
CustomLog logs/access.log combined
In the config above replace oslinux.xyz with the domain you want to serve.
Server Alias is not needed and used if you want several subdomains/domains pointing to the same location like adding www to your domain.
Server Admin should be your email address
DocumentRoot should point to the folder for the domain (Apache's default location is /var/www/html Recommended to create a folder with the same name as the domain to make managing it easier. You can use other locations for the folders but make sure your Apache user has read access to the location. If you are using a different folder than the default you will need to include the
<Directory "/home/oslinux/public_html"> </Directory> section only needs to be added in you are using a different directory, replace /home/oslinux/public_html with the location for the domain.
I would recommend you create separate configs for each domain and name the file to match the domain and add .conf to the end oslinux.xyz.conf
The default location for Apache config files is
Fedora based Distros "/etc/httpd/conf.d"
Debian based Distros "/etc/apache2/sites-available"
Here are some guides for creating virtual hosts.
Apache docs on virtual hosts.