...
This is enough to get us started, but feel free to read more details at Control-Escape.
...
My Virtual Hosting Strategy
There are so many different ways of doing this it's quite mind boggling. Here's my overall approachstrategy:
- I want clients to come in and manage the pure html aspects of their website, so each website will have it's own group and clients will belong to the website's group.
- Logging will be Virtual Host Based Logging. The pros and cons are are discussed in Apache Log Management.
- Each virtual host will also have a,
- browse-able "shared" folder to easily distribute files
- "shared.private' where .htaccess is enabled so users can set their own authentication parameters and indexing
- Most people only have one IP address to I'll use the "name based" hosting approach.
...
Looking in /etc/apache2/apache2.conf you will see a reference to the directory, /etc/apache2/sites-enabled/. Apache will look in this directory and load any virtual host file configurations.
Assuming you are logged in as a member of the staff group, we will be creating groups and users with reserved ids as mentioned in the basic setup,
Code Block | ||
---|---|---|
| ||
cd /home
sudo mkdir www.krypton.com # Home directory for the website.
sudo mkdir www.earth.com
cd /home/www.krypton.com
sudo mkdir www # Folder for static content
cd /home/www.earth.com
sudo mkdir www # Folder for static content
sudo addgroup \--gid 3100 wgkryptonian # Special work group to distinguish users who should have access to the website.
sudo addgroup \--gid 3101 wgearthling
cd /home
sudo chown \-R serveradmin:wgkryptonian ./www.krypton.com/
sudo chown \-R serveradmin:wgearthling ./www.earth.com/
sudo chmod \-R 775 www.krypton.com # Only svradm and users in the kryptonian group can manage. Apache(other's) still need to be able to read and browse.
sudo chmod \-R 775 www.earth.com |
Now we create users that will have access to their respective websites,
Warning |
---|
This article is still being transitioned from my old google wiki. |