Difference between revisions of "Running the website"
Jump to navigation
Jump to search
(New page: This is instructions on how to get the Apertium website with it's services, in another host. == Setting up == <pre> cd apertium-tools/apertium-turl/ g++ turl.c -o turl sudo cp turl /usr/l...) |
|||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
'''This page is deprecated''' see [[apertium-html-tools]] instead. |
|||
⚫ | |||
⚫ | |||
== Setting up == |
== Setting up == |
||
Line 9: | Line 12: | ||
cd webspace |
cd webspace |
||
⚫ | |||
sudo ln -s $PWD /var/www/apertium-www |
sudo ln -s $PWD /var/www/apertium-www |
||
⚫ | |||
vi common/available_pairs.php |
|||
sudo vi /var/lib/locales/supported.d/local |
sudo vi /var/lib/locales/supported.d/local |
||
Line 23: | Line 27: | ||
sudo locale-gen en_GB.utf8 |
sudo locale-gen en_GB.utf8 |
||
locale -a |
locale -a |
||
⚫ | |||
sudo chown www-data.www-data /var/log/apertium-www/ |
|||
</pre> |
</pre> |
||
Edit /etc/php5/apache2/php.ini and change register_long_arrays to 'On' |
|||
register_long_arrays = On |
|||
Line 48: | Line 65: | ||
allow from all |
allow from all |
||
deny from 85.176.169.45 |
deny from 85.176.169.45 |
||
# This directive allows us to have apache2's default start page |
|||
# in /apache2-default/, but still have / go to the right place |
|||
#RedirectMatch ^/$ /apache2-default/ |
|||
RedirectMatch ^/prototype/?(.*)$ http://www.apertium.org/?id=testdrive |
|||
RedirectMatch ^/translate/?(.*)$ http://www.apertium.org/?id=testdrive |
|||
RedirectMatch ^/stable/?(.*)$ http://www.apertium.org/?id=testdrive |
|||
RedirectMatch ^/apertium-unstable/?(.*)$ /unstable/ |
|||
</Directory> |
</Directory> |
||
Alias /webservice/ /var/www/webservice/ |
|||
⚫ | |||
Alias /styles/ /var/www/styles/ |
Alias /styles/ /var/www/styles/ |
||
<Directory "/var/www/styles/"> |
<Directory "/var/www/styles/"> |
||
AllowOverride None |
|||
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch |
|||
Order allow,deny |
|||
Allow from all |
|||
</Directory> |
|||
Alias /trautorom/ /var/www/trautorom/ |
|||
Alias /apertium/ /var/www/apertium/ |
|||
Alias /stable/ /var/www/apertium/ |
|||
<Directory "/var/www/apertium/"> |
|||
AllowOverride None |
|||
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch |
|||
Order allow,deny |
|||
Allow from all |
|||
</Directory> |
|||
Alias /unstable/ /var/www/apertium-unstable/ |
|||
<Directory "/var/www/apertium-unstable/"> |
|||
AllowOverride None |
|||
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch |
|||
Order allow,deny |
|||
Allow from all |
|||
</Directory> |
|||
Alias /testing/ /home/fran/svnroot/interface/ |
|||
<Directory "/home/fran/svnroot/interface"> |
|||
AllowOverride None |
AllowOverride None |
||
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch |
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch |
||
Line 103: | Line 83: | ||
Allow from all |
Allow from all |
||
</Directory> |
</Directory> |
||
ErrorLog /var/log/apache2/apertium-error.log |
ErrorLog /var/log/apache2/apertium-error.log |
||
Line 116: | Line 95: | ||
</nowiki> |
</nowiki> |
||
</pre> |
</pre> |
||
Remember: |
|||
sudo /etc/init.d/apache2 restart |
|||
[[Category:Services]] |
|||
[[Category:Web]] |
Latest revision as of 10:08, 12 May 2014
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 add: 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 www.apertium.org ServerAdmin webmaster@apertium.org DocumentRoot /var/www/apertium-www/ AccessFileName .htaccess <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all deny from 85.176.169.45 </Directory> Alias /styles/ /var/www/styles/ <Directory "/var/www/styles/"> AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None DirectoryIndex index.cgi index.pl index.php index.html Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> 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 </VirtualHost>
Remember:
sudo /etc/init.d/apache2 restart