Note

You are viewing the documentation for an older release of Interworx (6.x). To see documentation for the current generally available release of Interworx, click here: 7.13.

How to: Customize The Look of New SiteWorx Accounts by Editing the Skel File and Directory

Purpose:

This document will give the reader an overview of how to customize the “look” of new SiteWorx accounts.

Audience:

  • System Administrators of hosting companies and others wishing to customize the look of their new account screen.

  • System Administrators wishing to customize default virtual host configuration file.

Overview:

Each SiteWorx account on a server has a configuration file located inside the /etc/httpd/conf.d directory. The skel file is the file which becomes the template for all new virtual host configuration files. This document will give the reader an overview of what changes can be made and how to change them.

The skel directory is the directory containing the files copied to the html directory of all new SiteWorx accounts. This includes your start screen and any images or other config files (e.g. logos, robots.txt etc.).

In its current incarnation the skel directory contains the contents of the html directory (/chroot/accountname/domainname.com/html) only, not the user’s entire home directory.

The Skel File

The InterWorx Skel file is located /chroot/home/interworx/etc/vhost-base.conf Here are its default contents:

>:<>>
<>
DocumentRoot <>
ServerName <>
ServerAlias <>
ServerAdmin webmaster@<>
# subdomain logic
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www.<> [NC]
RewriteCond %{HTTP_HOST} !^<> [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-.]+).<> [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-.]+).<>/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
RewriteCond %{HTTP_HOST} ^www.([A-Z0-9a-z-.]+).<> [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^www.([0-9A-Za-z-.]+).<>/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
# end subdomain logic
ErrorLog <>
CustomLog <> combined
# php: default don't edit between this and the "end php" comment below
suPHP_Engine On
suPHP_UserGroup <> <>
AddHandler x-httpd-php .php
suPHP_AddHandler x-httpd-php .php
suPHP_ConfigPath /home/<>/etc
php_admin_flag engine On
php_admin_flag engine On
# end php
# cgi: <> don't edit between this and the "end cgi" comment below
>>
AllowOverride All
Options <> <>
<> # end cgi

When the account is created, InterWorx replaces all of the values in <> with actual account data when the virtual host configuration file for that domain is created.

AllowOverride is set to ALL in httpd.conf by default so you can add any Apache 2 directives that you wish to this file but anything here will be placed in EVERY virtual host configuration file created from that point on. These values, in turn, can be overridden on a directory by directory basis using .htaccess.

Editing this file WILL NOT make any changes to existing virtual host config files. If you need to make changes to all of your files they will need to be manually edited one at a time.

Variables and their Explanations:

DEFAULT VARIABLES

  • «IP_ADDR» – the IP address that the domain is assigned to

  • «PORT» – the port that the website is accessed on (normally 80)

  • «SUEXEC» – SuexecUserGroup permissions (the system user and group that have ownership rights over the domain. In InterWorx every SiteWorx account has its own system user based upon the first 8 characters of the default domain.)

  • «WEBROOT» – full system path to the html directory (e.g. /home/account/domainname.com/html/)

  • «DOMAIN» – the fully qualified domain name of the account (e.g. mydomain.com, sub.mydomain.com)

  • «ALIASES» – a list of alternate names for the domain (e.g. www.mysite.com ftp.mysite.com mail.mysite.com sub.mysite.com)

  • «ESCDOMAIN» – an escaped version of the domain, to be used with Apache directives that use a regular expression. For example, use «ESCDOMAIN» with the RewriteRule directive. What this looks like is the account domainname separated from its extension by a slash (e.g. mysite.com )

  • «ERRORLOG» – path to the error log

  • «XFERLOG» – path to transfer log

  • «CGISTATUS» – status of cgi on the account (1 = enabled 0 = disabled)

  • «CGI1» – full system path to cgi-bin directory (normally /home/account/domainname.com/html/cgi-bin/ )

  • «CGI2» – script aliases to the cgi bin (normally /cgi-bin/ /home/account/domainname.com/html/cgi-bin/

The Skel Directory

The InterWorx skel directory is located in /chroot/home/interworx/etc/skel and contains the following files by default

1.gif
2.gif
3.gif
index.html
interworx_logo.gif
robots.txt

You are free to edit or replace any or all of these files. These changes WILL NOT be overwritten by an InterWorx update.

The Default Index File

index.html is your new account start page. This page exists to show your clients that their account is set up and DNS is resolving. It is also a gateway to places to get help with their new hosting account and the control panel.

It is strongly recommended that you leave this file in place in an edited form. Hosting companies are encouraged to put their logo and contact information here in place of ours to “brand” the new accounts to your company. This page is generally deleted or overwritten by webmasters when they create their homepages, but looks nice for your clients.

robots.txt

robots.txt tells search engine spiders who is allowed to search your site and who is not; it can also exclude certain directories from the search (e.g. the images directory) if desired. This is in accordance with the Robots Exclusion Standard. [More info: Wikipedia ]

The default configuration allows all search engine spiders to index the site and allows the spiders to index the entire site. The config file (below) gives a basic explanation of its syntax.

#***************************************************************************\*
# robots.txt
# : Robots, spiders, and search engines use this file to determine which
# content they should \*not\* crawl while indexing your website.
# : This system is called "The Robots Exclusion Standard."
# : It is strongly encouraged to use a robots.txt validator to check
# for valid syntax before any robots read it!
#
# Examples:
#
# Instruct all robots to stay out of the admin area.
# : User-agent: \*
# : Disallow: /admin/
#
# Restrict Google and MSN from indexing your images.
# : User-agent: Googlebot
# : Disallow: /images/
# : User-agent: MSNBot
# : Disallow: /images/
#***************************************************************************\*
User-agent: \*
Disallow:

For more info on the Robots Exclusion Standard and other allowed exclusions and syntax visit http://www.robotstxt.org/