forms.libre.is
Documentation for forms website.
Install Dependencies
Using Debian stable (bookworm).
sudo apt install zip unzip php php-mbstring mariadb-server php-mysql \
php-gd php-zip php-xml php-intl php-ldap php-imap php-curl
Configure OS
Thusly.
Apache config, with certbot cert installed.
<VirtualHost forms.libre.is:80>
ServerName forms.libre.is
ServerAlias form.libre.is
ServerAdmin webmaster@libre.is
DocumentRoot /var/www/html/forms-libre-is
ErrorLog ${APACHE_LOG_DIR}/error-libre-forms-is.log
CustomLog ${APACHE_LOG_DIR}/access-libre-forms-is.log combined
RewriteEngine on
ReWriteCond %{HTTPS} off
RewriteCond %{SERVER_NAME} =form.libre.is
RewriteRule ^ https://forms.libre.is%{REQUEST_URI} [END,NE,R=permanent]
ReWriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{SERVER_NAME} =forms.libre.is
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost forms.libre.is:443>
ServerName forms.libre.is
ServerAlias form.libre.is
ServerAdmin webmaster@libre.is
DocumentRoot /var/www/html/forms-libre-is
ErrorLog ${APACHE_LOG_DIR}/error-ssl-libre-forms-is.log
CustomLog ${APACHE_LOG_DIR}/access-ssl-libre-forms-is.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =form.libre.is
RewriteRule ^ https://forms.libre.is%{REQUEST_URI} [END,NE,R=permanent]
ReWriteCond %{HTTPS} off [OR]
ReWriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
ReWriteRule ^(.*)$ https://%1$1 [L,R=301]
<Directory /var/www/html/forms-libre-is>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/form.libre.is-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/form.libre.is-0001/privkey.pem
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php/8.2/apache2/php.ini
sudo systemctl restart apache2
Database
Using MariaDB, a MySQL fork.
sudo mariadb-admin password
mariadb -uroot -p
In database run:
CREATE USER 'limesurvey'@'localhost' IDENTIFIED BY 'mypassword';
CREATE DATABASE IF NOT EXISTS limesurvey;
GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurvey'@'localhost' IDENTIFIED BY 'mypassword';
Install
Download latest version here:
wget https://download.limesurvey.org/latest-master/limesurvey6.6.2+240827.zip
unzip limesurvey6.6.2+240827.zip
cp -a limesurvey/* /var/www/html/limesurvey-form-libre-is/
cp -a limesurvey/.* /var/www/html/limesurvey-form-libre-is/
sudo chmod -R 755 /var/www/html/limesurvey-form-libre-is/tmp
sudo chmod -R 755 /var/www/html/limesurvey-form-libre-is/upload
sudo chmod -R 755 /var/www/html/limesurvey-form-libre-is/application/config
sudo chown -R www-data /var/www/html/limesurvey-form-libre-is/tmp
sudo chown -R www-data /var/www/html/limesurvey-form-libre-is/upload
sudo chown -R www-data /var/www/html/limesurvey-form-libre-is/application/config
Configure Site
Edit /var/www/html/limesurvey-form-libre-is/application/config
Run
Go here and create admin user, etc.