Inhaltsverzeichnis

Preparation Apache Webserver

Tip: If you changed the apache cofiguration the webserver has to be rebooted. Apache 2 can do this without interrupting all running connections (and surveys).

Installation Directory

In ideal case the webserver displays the user/visitor only the things that he should see. Especially it is not possible to see „from outside“ where the files are placed on the server.

So it is necessary to distinguish at the installation directory where it is placed intern (e.g. /var/www/sosci/) and under which name it is called extern (e.g. http://www.domain.tld/survey/). There are at least two options that the directory is visible „from outside“ via HTTP or HTTPS.:

Alias /survey "C:/Daten/SoSci"
<Directory "C:/Daten/SoSci">
  AllowOverride All
  Options MultiViews 
  Order allow,deny
  Allow from all
</Directory>

Note: The alias is only after a reboot or a reload of the configuaration available.

Access Controll

Users accessing the web server via HTTP „from outside“ should be able to access the project directories, the directory admin/, images/ and so on – but not the protected file storage or the configuration.

At the atndard configuaration apache checks if a file .htaccess is placed in a directory. Based on this file SoSci Survey can restrict the accesses. If apache is configurated to ignore the .htaccess files the following addition httpd.conf on the file is needed.

Ofcourse the directory names (C:/Daten/SoSci/) have to be adjusted to de respective installation.

<Directory "C:/Daten/SoSci/inc/">
  Order allow,deny
  deny from all
</Directory>
<Directory "C:/Daten/SoSci/system/">
  Order allow,deny
  deny from all
</Directory>
<Directory "C:/Daten/SoSci/files/">
  Order allow,deny
  deny from all
</Directory>

Connections

Ideally several persons are accessing the survey server at the same time. Therefore it is necessary that several connections are possible at the same time - if all connections are occupied further user or also the project administrator do not get any response of the server and get an error message from the browser that the server is not reachable.

In addition, SoSci Survey is a large package that also requires a certain amount of memory and computing time. Therefore the maximum number of server processes is restricted.

If the server can be operated in worker mode, this allows more open connections with the same memory configuration. But therefore a conversion from PHP modul to CGI is necessary: Apache2 Worker with PHP and fcgid (FastCGI)

For a web server with 1 GB (4 GB) of memory, the following Apache settings have proven effective for the prefork operating mode:

at oFb 2.0.00 all processors were also fully occupied with it, then a further increase costs only more memory). If there is more memory availablethe value can be higher. But be careful on a V-Server: Here the maximum memory is not automatically the one that is available (s. Script 3 below).

Case Sensitivity

By default, an Apache on a Linux system distinguishes between capital and small letters for file names (case-sensitive). This can cause a problem if the link to the questionnaire is entered by hand and the participants do not note the capital and smal letters.

Here the apache module helps mod_speling, which apache2 includes by standard. It is activated by the common command:

(sudo) a2enmod speling

To be activatet on the server the module has also to be activated at the configuration. It makes sense to place the following commands in the <Directory> area you have created for SoSci Survey (see above).

<IfModule mod_speling.c>
    CheckSpelling on
    CheckCaseOnly on
</IfModule>''

The line CheckCaseOnly on is optional. It restricts the correction of typos to upper/lower case.

To activate the changes the configuration has to be reloaded.

sudo /etc/init.d/apache2 reload