Running the website

From Apertium
Revision as of 10:08, 12 May 2014 by Unhammer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page is deprecated see apertium-html-tools instead.

This is instructions on how to get the old php-version of the Apertium website with its services, on another host.

Setting up[edit]

cd apertium-tools/apertium-turl/
g++ turl.c -o turl
sudo cp turl /usr/local/bin/
cd -

cd webspace
sudo ln -s $PWD /var/www/apertium-www

vi config/apertium-config.php
vi common/available_pairs.php

sudo vi /var/lib/locales/supported.d/local

en_GB.utf8  UTF-8
en_GB.UTF-8 UTF-8
es_ES.UTF-8 UTF-8

sudo dpkg-reconfigure locales
sudo locale-gen en_GB.utf8
locale -a

sudo mkdir /var/log/apertium-www/
sudo chown www-data.www-data /var/log/apertium-www/

Edit /etc/php5/apache2/php.ini and change register_long_arrays to 'On'

   register_long_arrays = On

Now, edit /etc/apache2/sites-enabled/apertium and insert:

#NameVirtualHost *:80
<VirtualHost *:80>
#	ServerName
	DocumentRoot /var/www/apertium-www/
	AccessFileName .htaccess

	<Directory />
		Options FollowSymLinks
		AllowOverride None
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
		deny from

	Alias /styles/ /var/www/styles/
	<Directory "/var/www/styles/">
		AllowOverride None
		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		DirectoryIndex index.cgi index.php index.html
		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all

	ErrorLog /var/log/apache2/apertium-error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/apertium-access.log combined
	ServerSignature On


 sudo /etc/init.d/apache2 restart