Managing your project website
Most projects have a website resource attached.
There are 3 basic types of website configurations supported at dotsrc.org: Static HTML website, PHP website and JSP website. You can always switch between these. To do so, you have to send an email to staff@dotsrc.org requesting it.
Your website will be hosted on it's own domain, in the form <projectname>.dotsrc.org.
Website files
Uploading files for the website
Uploading files to your website is done in the same manner as uploading other files to your dotsrc.org project homedir. Checkout for more information on this.
Where to place the website files
Files placed in www/htdocs are used for serving your website. Your website is in other words configured with DocumentRoot $HOME/www/htdocs where $HOME is your project homedir.
Website filename extensions
HTML files must be named with the .html or .htm extension. If you wish to use SSI (Apache Server Side Includes), you should use the .shtml extension instead.
PHP files should be named with the .php or .phtml extension. These are the only two extensions supported by default. If you wish to use a 3rd party open source PHP application on your website, which uses another extension, like fx. .php3, you have to ask us at staff@dotsrc.org to enable it for your website.
Default directory index file
When a client requests the index of a directory of your project website, the following files are tried in the order listed: index.html index.htm index.php. If one of these is found, it is served. If not, the contents of the directory is shown.
Hidden / secret files
If you for any reason need one or more of your website files to be inaccessible for normal download, which is often the case with PHP include files specifying MySQL password, you can use our support for dot-file hiding.
Our dot-file hiding policy works by making any file (or directory) inaccessible for download via anonymous FTP, HTTP, and rsync. The files can still be used in your PHP pages with the include() or require() functions.
When your project homedir is first setup, we have created a few secret directories. These are:
- $HOME/.secret/
- $HOME/www/htdocs/.secret/
- $HOME/www/includes/.secret/
You can use these to store normally named files (not dot-files), which will then be hidden as if they were dot-files.
CGI Scripts
Projects can in special situations use CGI-scripts. However due to security reasons, we require the source code to be approved by a member of the staff before installation. We know that this is rather cumbersome, so if you plan on developing your own CGI-scripts, we strongly suggest you consider using PHP or Java instead!
If you would like to see a specific 3rd party CGI application installed, you should contact staff@dotsrc.org, and we will look into it. We might decide to install it for general usage for all our projects.
Java Servlets / JSP
If you mail staff@dotsrc.org we can setup a Tomcat server for your project where you can run servlets and JSP. For documentation please go to java.sun.com.
Multi-language websites
Multi-language websites
As a natural extension on our demand for all project websites to be available in danish or english, we support multi-language websites. This is done with Apache type-map, as described in the mod_negotiation documentation.
Let us start with a simple example. You have a webpage which you have translated, so that it is available in both danish and english. The english page is named foo.html.en and the danish page foo.html.da. To enable browser controlled content negotiation (here language selection), you have to write a file with the following content and save it as foo.var:
URI: foo; vary="type,language"
URI: foo.html.da
Content-language: da
URI: foo.html.en
Content-language: en
To link to this document, use the foo.var URL. For testing purposes, you can point your browser directly to one of the translated html files, but you should not need to link directly to them.
Controlling charsets
If one or more of the languages you wish to support uses a different charset from our default (ISO-8859-1), you have to specify this.
This is easiest done by using a charset extension for the translated files. Let's illustrate it with an example. You wish to have a webpage available in english and chinese. The chineese version requires the charset set to Big5. You save the english page as foo.html.en as usual. The chineese page must be saved with an additional file extension, specifying the charset. In this case you should save the file as foo.html.zh.big5. The foo.var should look like this:
URI: foo; vary="type,language"
URI: foo.html.zh.big5
Content-type: text/html; charset=Big5
Content-language: zh_TW,zh
URI: foo.html.en
Content-language: en
Notice the Content-type line for the chineese file. This is required in addition to the charset filename extension!
The supported charset filename extensions are (shown as their Apache AddCharset directives):
AddCharset ISO-8859-8 .iso8859-8
AddCharset ISO-2022-JP .jis
AddCharset ISO-2022-KR .iso-kr
AddCharset ISO-8859-2 .iso-pl
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
If you need support for a charset not listed above, please let us know at staff@dotsrc.org so we can add it to our Apache configuration.

