A Directory Structure For Domain Virtual Hosting
Over time I have come up with a simple and effective strategy to separate content, applications and application data. By breaking up website content into smaller, more general components I am able to gain the flexibility that my clients require.
Content
Resources that are used by a particular service (not a Web application). HTML, PHP and images are typical examples of content for a webserver. Welcome banners are an example of possible FTP server content.
Web application
Third party applications that run within a web server. Since I am a heavy Gentoo user I only install packages if there is an ebuild available. Examples would be applications like PyBlosxom or SquirrelMail.
Web application data
The user’s data that is used by the web application. Data for a MoinMoin wiki or blog posts are examples of web application data.
The basic path structure is /srv/{fqdn}/{service}/{…} where:
{fqdn} is a fully qualified domain name
{service} is a descriptor for the service being virtual hosted
{…} is service specific files/directories
The /srv/ is defined as a path that contains “data for services provided by the system” by the FHS (Filesystem Hierarchy Standard). The FHS only defines it’s existence and not the details of it’s structure. For my setup I define the structure as /srv/{fqdn}/{service}/{…}.
Each fully qualified domain name has it’s own subdirectory under /srv. I always use the fqdn to make it less likely that I will get confused. Most of the domains I host have 2 or more subdomains or it is nice to keep everything partitioned.
The /srv/{fqdn}/ directory contains a subdirectory for each service that is virtual hosted for the domain. All of the data that is served for the domain resides in one of these subdirectories.
Example structure for www.roninds.net:
/srv/vvv.roninds.net/ftp
/srv/vvv.roninds.net/mail
/srv/vvv.roninds.net/www
Future posts will elaborate a further on this topic.
Issue with my ALPS touchpad using the 2.6 Linux kernel
When I upgraded to the gentoo-sources-2.6.12-r9 kernel I started to have mouse troubles. I was no longer able to double tap to select text or to select and move windows. If that was not anoyinig enough, the mouse would randomly click things as I moved the cursor around.
My laptop’s ALPS Touchpad seemed to be detected ok and the AlpsPS/2 driver was automatically loaded. Some Google searches revealed that this was the problem and that the AlpsPS/2 driver had an issue with hardware tapping. It seems that I could either use the synaptic device driver or I change the boot options in my grub.conf.
I thought that using the driver would be the best option so I followed the instructions I found here. Adding event interface support to my kernel caused my wlan-ng drivers to completely freeze my laptop when the module was loaded. I didn’t have the time to find out what was really going on so I deciced to try changing my grub.conf.
After adding ‘psmouse.proto=imps’ to my boot options in grup.conf the mouse started to work correctly. I’ll probably end up revisiting the synaptic driver eventually, but for now a working mouse of good enough.








