Difference between pages "Global labels taxonomy" and "Product Opener/Installation"

From Open Food Facts wiki
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
 +
Installation instructions for Product Opener (see [[Project:Product Opener]]).
  
Last sync to Open Food Facts: January 21st 2014.
+
== Before you start ==
  
 +
Product Opener is not yet released as open source. The instructions below are for reference and for early testers of Product Opener. They are very likely to change as the code will be restructured, made more independent of proprietary code and specific Open Food Facts uses etc.
  
<pre>
+
When it is released, Product Opener will have much easier to use install scripts and instructions.
  
stopwords:en: ingredients, from, with, of, by, the, verified, certified, approved, 100%, pure, product, guaranty, guaranteed
+
== Install directory ==
stopwords:fr: ingrédients, issus, de, l', convient, peut convenir, au, aux, régime, régimes, conforme, validé, vérifié, certifié, par, un, une, approuvé, 100%, pur, garantie, garanti, produit, sas
 
stopwords:es: por, la, las, los, el, apto, para, certificado, controlado, registrado, 100%
 
  
 +
Instructions below use /home/obf for the install directory, replace with your install dir.
  
synonyms:en: coloring, colouring, color, colour
+
== Product Opener code ==
  
synonyms:en: flavor, flavour, flavoring, flavouring
+
=== Configuration ===
  
synonyms:en: GMOs, Genetically Modified Organisms
+
==== startup.pl ====
  
synonyms:en: MSG, glutamate
+
This file is used to preload Perl module in Apache.
synonyms:fr: GMS, glutamate monosodique, glutamate mono-sodique, glutamate, msg
+
It contains a path that needs to be updated:
  
synonyms:en: preservatives, conservatives
+
<pre>
 +
# Needs to be configured
 +
use lib "/home/obf/cgi/";
 +
</pre>
  
synonyms:en: without, 0%
+
==== Config.pm ====
synonyms:es: sin, 0%
 
synonyms:fr: sans, 0%
 
  
synonyms:fr: ajout, adjonction
+
==== Config2.pm ====
  
synonyms:fr: carbone, co2
+
Contains info about the domain, database and path. This is separated from Config.pm so that it is easy to create test instance that share the same configuration in Config.pm but are on other domains.
synonyms:en: carbon, co2
 
  
synonyms:fr: durable, soutenable, responsable
+
<pre>
 +
# server constants
 +
$domain = "openbeautyfacts.org";
  
synonyms:fr: fabrication, production
+
# server paths
 +
$www_root = "/home/obf/html";
 +
$data_root = "/home/obf";
  
synonyms:fr: fabrique, produit
+
$mongodb = "obf";
 +
</pre>
  
synonyms:fr: naturel, d'origine naturelle, origine naturelle
+
== MongoDB database ==
  
en: 1% for the planet, 1 percent for the planet, one percent for the planet
+
== Apache servers ==
fr: 1% pour la planète
 
es: 1% para el planeta
 
  
 +
In production we use a light weight Apache web server for static files (e.g. images) that does reverse proxying to a modperl Apache server that dynamically generates the HTML pages.
  
en: 100% natural
+
If the trafic is low or moderate, you can use only one Apache mod_perl server that also serves images etc.
fr: 100% naturel
 
es: 100% natural
 
  
en: 25% less salt
+
In the example below, the Apache mod_perl server listens on port 19000.
fr: -25% de sel, moins 25% de sel
 
  
en: Carbon compensated product, carbon neutral
+
=== Light-weight reverse proxy for static files ===
fr: Produit compensé carbone, Carbone neutre, neutre en carbone, carbone compensé
 
  
en: Carbon footprint, carbon emissions, product that specifies the carbon footprint
+
Add to httpd.conf:
fr: Empreinte carbone, émissions de carbone
 
es: Huella de carbono, Emisiones de CO2
 
it: Emissioni di CO2, impronta climatica
 
pt: Pegada de carbono, Emissões de CO2
 
de: CO2-Emissionen
 
  
en: EU Agriculture, European Union agriculture
+
<pre>
fr: Agriculture UE, Agriculture Union Européeenne
 
es: Agricultura UE, Agricultura Unión Europea
 
  
en: Fair trade
+
<VirtualHost *>
es: Comercio justo, Fairtrade-Comercio Justo
+
DocumentRoot /home/obf/html
fr: Commerce équitable, équitable
+
ServerName world.openbeautyfacts.org
 +
ServerAlias *.openbeautyfacts.org
  
< en:Fair trade
+
ErrorLog /home/obf/logs/proxy_error_log
en: Fairtrade International, Fairtrade, FLO international, FLO
+
CustomLog /home/obf/logs/proxy_access_log combined
fr: Fairtrade International, Fairtrade, FLO international, FLO
+
ServerAdmin stephane@openbeautyfacts.org
es: Fairtrade International, Fairtrade, FLO international, FLO
 
  
< en:Fair trade
+
<Directory "/home/obf/html">
en: Max Havelaar, Max Havelar
+
    Options -Indexes FollowSymLinks
 +
    Order allow,deny
 +
    Allow from all
 +
</Directory>
 +
RewriteEngine on
 +
RewriteCond  %{REQUEST_URI}  !/./
 +
RewriteRule ^(/cgi/.*)$ http://localhost:19000$1 [P,L]
 +
RewriteMap escape int:escape
 +
RewriteRule ^/favicon.ico$ /favicon.ico [L]
 +
RewriteCond  %{REQUEST_URI}  !^/images/
 +
RewriteCond  %{REQUEST_URI}  !^/js/
 +
RewriteCond  %{REQUEST_URI}  !^/rss/
 +
RewriteCond  %{REQUEST_URI}  !^/robots
 +
RewriteCond  %{REQUEST_URI}  !^/clicks/
 +
RewriteCond  %{REQUEST_URI}  !^/data/
 +
RewriteCond  %{REQUEST_URI}  !^/files/
 +
RewriteRule  ^(.*)$ http://localhost:19000/cgi/display.pl?${escape:$1} [P,L,QSA]
 +
</VirtualHost>
  
< en:Max Havelaar
 
fr: Max Havelaar Belgique
 
nl: Max Havelaar Belgie
 
  
< en:Max Havelaar
+
<VirtualHost *>
fr: Max Havelaar France
+
DocumentRoot /home/obf/html
 +
ServerName openbeautyfacts.org
 +
ErrorLog /home/obf/logs/proxy_error_log
 +
CustomLog /home/obf/logs/proxy_access_log combined
 +
DirectoryIndex index.html index.shtml
 +
<Directory "/home/obf/html">
 +
    Options -Indexes FollowSymLinks Includes
 +
    Order allow,deny
 +
    Allow from all
 +
</Directory>
 +
RewriteEngine on
 +
RewriteCond %{HTTP_HOST} ^openbeautyfacts\.org
 +
RewriteRule ^/products$ /products.shtml [L]
  
< en:Fair trade
+
</VirtualHost>
fr: TransFer, TransFer Canada
 
  
en: Fed without GMOs
+
</pre>
fr: Nourri sans OGM
 
  
en: FSC, Forest Stewardship Council
+
=== modperl Apache server for dynamic pages ===
es: FSC, Forest Stewardship Council, Consejo de Administración Forestal
 
  
en: Gluten-free, Without gluten, No gluten
+
* download the latest version of the source of the Apache httpd server from the 2.2 branch (2.2.29 when writing this)
es: Sin gluten
+
** do not use the 2.4 branch as mod_perl is not yet compatible with it
fr: Sans gluten
+
* extract the source
it: Senza glutine
+
* ./configure --with-mpm=prefork --prefix=/home/obf/apache --enable-rewrite --enable-proxy --enable-proxy_http --enable-deflate --disable-userdir --enable-headers
 +
* make
 +
* make install
  
< en:Gluten-free
+
* download the latest version of mod_perl from http://perl.apache.org/
en: FACE
+
* extract the source
es: FACE
+
* perl Makefile.PL MP_APXS=/home/obf/apache/bin/apxs
 +
* make
 +
* make install
  
en: Kosher, kasher
+
==== Configuration ====
fr: Kascher, Kasher, Cacher, casher, kacher, cascher, kosher
 
es: Kosher
 
  
< en:Kosher
+
In /home/obf/apache/conf/httpd.conf:
en: Orthodox Union, OU
 
  
en: made in France
+
Change the port:
fr: fabriqué en France, production française
 
es: Fabricado en Francia
 
  
en: natural colorings
+
Listen 19000
fr: colorants naturels, colorant naturel
 
es: Colorantes naturales
 
  
en: natural flavors
+
Add at the end:
fr: arômes naturels, arôme naturel
 
es: Aromas naturales
 
  
en: never frozen
+
<pre>
fr: jamais congelé
+
PerlWarn Off
es: Nunca congelado
+
PerlRequire /home/obf/cgi/startup.pl
 
 
en: no added salt
 
fr: sans sel ajouté
 
es: Sin sal añadida
 
 
 
en: No added sugar
 
fr: Sans sucre ajouté, sans sucres ajoutés, sans ajout de sucre
 
es: Sin azúcares añadidos, 0% Azúcares añadidos
 
 
 
en: No additives
 
fr: Sans additifs
 
es: Sin aditivos
 
 
 
en: no alcohol, alcohol-free
 
fr: sans alcool
 
es: Sin alcohol
 
 
 
en: no artificial colors
 
fr: sans colorants artificiels
 
es: Sin colorantes artificiales
 
 
 
en: no artificial flavors
 
fr: sans arômes artificiels, sans arôme artificiel
 
es: Sin aromas artificiales
 
 
 
en: no aspartame, aspartame free
 
fr: sans aspartame
 
es: Sin aspartamo, Sin aspartame
 
 
 
en: No Bisphenol-A, No BPA, BPA free, Bisphenol-A free
 
fr: Sans bisphénol-A, Sans BPA
 
es: Sin bisfenol A, Sin BPA
 
 
 
en: No caffeine, caffeine free
 
fr: Sans caféine, sans théine
 
es: Sin cafeína
 
 
 
en: no cholesterol, cholesterol-free
 
fr: sans cholestérol
 
es: Sin colesterol
 
 
 
en: No colorings, no added colorings
 
fr: Sans colorants, sans colorant ajouté, sans ajout de colorant
 
es: Sin colorantes, Sin colorantes añadidos
 
 
 
en: no eggs, egg free
 
fr: sans oeufs
 
es: Sin huevo, Sin huevos
 
 
 
en: no flavors, no added flavors
 
fr: sans arômes, sans arômes ajoutés
 
es: Sin aromas, Sin aromas añadidos
 
 
 
en: no flavour enhancer
 
fr: sans exhausteur de goût, sans exhausteurs de goût
 
 
 
< en:No flavour enhancer
 
en: No MSG, MSG free
 
fr: Sans glutamate, sans GMS
 
es: Sin glutamato, Sin glutamato monosódico, Sin glutamato de sodio, Sin GMS
 
 
 
en: No GMOs
 
fr: Sans OGM
 
es: Sin OMG, Sin transgénicos, Sin OMGs, Sin Organismos Modificados Genéticamente
 
de: Ohne Gentechnik
 
 
 
en: no lactose, lactose-free
 
fr: sans lactose
 
es: Sin lactosa
 
it: Senza lattosio
 
 
 
en: No lecithine, lecithine-free
 
fr: Sans lécithine
 
es: Sin lecitina
 
 
 
en: no milk, milk-free
 
fr: sans lait
 
es: Sin leche
 
 
 
en: No preservatives, no added preservatives
 
fr: Sans conservateurs, sans conservateur ajouté, sans ajout de conservateur
 
es: Sin conservantes, Sin conservantes añadidos
 
 
 
en: no soy, soy free
 
fr: sans soja
 
es: Sin soja
 
 
 
en: no sugar, sugar-free
 
fr: sans sucre
 
es: Sin azúcar
 
 
 
en: not advised for pregnant women
 
fr: déconseillé aux femmes enceintes
 
es: Desaconsejado para embarazadas, No aconsejado para embarazadas, No aconsejado para mujeres embarazadas, Desaconsejado para mujeres embarazadas
 
 
 
en:With sulfites, Contains sulfites
 
es:Con sulfitos, Contiene sulfitos
 
 
 
en:Lowers cholesterol
 
es:Reduce el colesterol
 
 
 
en:Rich in vitamin C
 
es:Rico en vitamina C
 
 
 
en:Rich in fiber
 
es:Rico en fibra
 
 
 
en: Organic
 
es: Ecológico, Producto ecológico, Biológico, Producto biológico, Orgánico, Producto orgánico, Eco, Bio, ECO, BIO
 
fr: Bio, agriculture biologique, biologique, organic, organique,  issu de l’agriculture biologique, ingrédients issus de l’agriculture biologique, Les-ingredients-sont-issus-d-une-agriculture-biologique
 
de:Ökologische Produkt
 
 
 
< en:Organic
 
en: EU Organic, European Organic
 
es: Ecológico UE, Ecológico U.E., Producto ecológico europeo
 
fr: Bio européen, Label bio européen, bio ce, bio européen, bio europe
 
 
 
< en:EU Organic
 
en: CH-BIO-004
 
 
 
< en:EU Organic
 
en: CH-BIO-006, ch-bio-scesp-006
 
 
 
< en:EU Organic
 
en: CZ-BIO-001
 
 
 
< en:EU Organic
 
en: BE-BIO-01
 
 
 
< en:EU Organic
 
en: BE-BIO-02
 
 
 
< en:EU Organic
 
en: DE-ÖKO-001
 
 
 
< en:EU Organic
 
en: DE-ÖKO-003
 
 
 
< en:EU Organic
 
en: DE-ÖKO-007
 
 
 
< en:EU Organic
 
en: DE-ÖKO-013
 
 
 
< en:EU Organic
 
en: ES-ECO-001-AN
 
 
 
< en:EU Organic
 
en: ES-ECO-001-CM
 
 
 
< en:EU Organic
 
en: ES-ECO-002-AN
 
 
 
< en:EU Organic
 
en: ES-ECO-002-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-002-CM
 
 
 
< en:EU Organic
 
en: ES-ECO-003-AN
 
 
 
< en:EU Organic
 
en: ES-ECO-004-AN
 
 
 
< en:EU Organic
 
en: ES-ECO-004-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-005-AN
 
 
 
< en:EU Organic
 
en: ES-ECO-005-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-006-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-007-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-008-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-009-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-010-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-011-AR
 
 
 
< en:EU Organic
 
en: ES-ECO-012-AS
 
 
 
< en:EU Organic
 
en: ES-ECO-013-IB
 
 
 
< en:EU Organic
 
en: ES-ECO-014-IC
 
 
 
< en:EU Organic
 
en: ES-ECO-015-CN
 
 
 
< en:EU Organic
 
en: ES-ECO-016-CL
 
 
 
< en:EU Organic
 
en: ES-ECO-017-AN
 
 
 
< en:EU Organic
 
en: ES-ECO-017-CM
 
 
 
< en:EU Organic
 
en: ES-ECO-019-CT
 
 
 
< en:EU Organic
 
en: ES-ECO-020-CV
 
 
 
< en:EU Organic
 
en: ES-ECO-021-EX
 
 
 
< en:EU Organic
 
en: ES-ECO-022-GA
 
 
 
< en:EU Organic
 
en: ES-ECO-023-MA
 
 
 
< en:EU Organic
 
en: ES-ECO-024-MU
 
 
 
< en:EU Organic
 
en: ES-ECO-025-NA
 
 
 
< en:EU Organic
 
en: ES-ECO-026-VAS
 
 
 
< en:EU Organic
 
en: ES-ECO-027-RI
 
 
 
< en:EU Organic
 
en: ES-ECO-028-CM
 
 
 
< en:EU Organic
 
en: FR-BIO-01
 
 
 
< en:EU Organic
 
en: IT-BIO-003
 
 
 
< en:EU Organic
 
en: IT-BIO-004
 
 
 
< en:EU Organic
 
en: IT-BIO-005
 
 
 
< en:EU Organic
 
en: IT-BIO-006
 
 
 
< en:EU Organic
 
en: IT-BIO-007
 
 
 
< en:EU Organic
 
en: IT-BIO-008
 
 
 
< en:EU Organic
 
en: IT-BIO-009
 
 
 
< en:EU Organic
 
en: IT-BIO-010
 
 
 
< en:EU Organic
 
en: IT-BIO-011
 
 
 
< en:EU Organic
 
en: IT-BIO-012
 
 
 
< en:EU Organic
 
en: IT-BIO-013
 
 
 
< en:EU Organic
 
en: IT-BIO-014
 
 
 
< en:EU Organic
 
en: NL-BIO-01
 
 
 
< en:EU Organic
 
en: PT-BIO-03
 
 
 
< en:EU Organic
 
en: PT-BIO-04
 
 
 
< en:EU Organic
 
en: AT-BIO-402
 
 
 
< en:Fair trade
 
< en:Organic
 
fr: Bio-équitable, bioéquitable
 
 
 
< en:Organic
 
en: USDA Organic
 
 
 
< en:Organic
 
fr: AB Agriculture Biologique, AB, Agence Bio, ab bio, bio ab, Ab-certifie-agriculture-biologique, ab certifié
 
 
 
< en:Organic
 
fr: Bio-Cohérence
 
 
 
< en:Organic
 
en: Biodynamic agriculture
 
fr: Bio-dynamie, biodynamie, agriculture biodynamique, agriculture bio-dynamique
 
es: Agricultura biodinámica
 
 
 
< en:Biodynamic agriculture
 
en: Demeter
 
fr: Demeter, Association Demeter, Demeter France, Association Demeter France
 
es: Demeter
 
 
 
< en:Organic
 
fr: Bio-Solidaire, biosolidaire
 
 
 
< en:Organic
 
en: BO-BIO-126
 
 
 
en: Palm oil free, Without palm oil, No palm oil
 
fr: Sans huile de palme
 
es: Sin aceite de palma
 
 
 
en: PDO, P.D.O, Protected Designation of Origin
 
es: DOP, D.O.P, Denominación de Origen Protegida
 
fr: AOP, A.O.P, Appellation d'origine protégée
 
it: DOP, D.O.P, Denominazione di origine protetta
 
 
 
en: Spanish protected product
 
es: Producto protegido de España
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Azafrán de La Mancha, Azafrán de La Mancha
 
es: DOP Azafrán de La Mancha, D.O.P. Azafrán de La Mancha, Azafrán de La Mancha
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Pasas de Málaga, Pasas de Málaga
 
es: DOP Pasas de Málaga, D.O.P. Pasas de Málaga, Pasas de Málaga
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Pimentón de la Vera, Pimentón de la Vera
 
es: DOP Pimentón de la Vera, D.O.P. Pimentón de la Vera, Pimentón de la Vera
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Pimentón de Murcia, Pimentón de Murcia
 
es: DOP Pimentón de Murcia, D.O.P. Pimentón de Murcia, Pimentón de Murcia
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Sierra de Segura, Sierra de Segura
 
es: DOP Sierra de Segura, D.O.P. Sierra de Segura, Sierra de Segura
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Arroz de Valencia, PDO Arròs de València, Arròs de València
 
es: DOP Arroz de Valencia, D.O.P. Arroz de Valencia, Arroz de Valencia, DOP Arròs de València, D.O.P. Arròs de València, Arròs de València
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Arroz de Calasparra, Arroz de Calasparra
 
es: DOP Arroz de Calasparra, D.O.P Arroz de Calasparra, Arroz de Calasparra
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Montes de Toledo, Montes de Toledo
 
es: DOP Montes de Toledo, D.O.P. Montes de Toledo, Montes de Toledo
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Estepa
 
es: DOP Estepa, D.O.P. Estepa, Aceites de Estepa
 
 
 
< en:PDO
 
< en:Spanish protected product
 
en: PDO Vinagre de Jerez, Vinagre de Jerez
 
es: DOP Vinagre de Jerez, D.O.P. Vinagre de Jerez, Vinagre de Jerez
 
 
 
en: PGI, P.G.I, Protected Geographical Indication
 
es: IGP, I.G.P., Indicación Geográfica Protegida
 
fr: IGP, I.G.P, Indication Géographique Protégée
 
 
 
< en:PGI
 
< en:Spanish protected product
 
en: PGI Berenjena de Almagro, Berenjena de Almagro
 
es: IGP Berenjena de Almagro, I.G.P. Berenjena de Almagro, Berenjena de Almagro
 
 
 
< en:PGI
 
< en:Spanish protected product
 
en: PGI Pemento do Couto, Pemento do Couto
 
es: IGP Pemento do Couto, I.G.P. Pemento do Couto, Pemento do Couto
 
 
 
< en:PGI
 
< en:Spanish protected product
 
en: PGI Alubia de La Bañeza-León, Alubia de La Bañeza-León
 
es: IGP Alubia de La Bañeza-León, I.G.P. Alubia de La Bañeza-León, Alubia de La Bañeza-León
 
 
 
< en:PGI
 
< en:Spanish protected product
 
en: PGI Garbanzo de Fuentesaúco, Garbanzo de Fuentesaúco
 
es: IGP Garbanzo de Fuentesaúco, I.G.P. Garbanzo de Fuentesaúco, Garbanzo de Fuentesaúco
 
 
 
< en:PGI
 
< en:Spanish protected product
 
en: PGI Lenteja de La Armuña, Lenteja de La Armuña
 
es: IGP Lenteja de La Armuña, I.G.P. Lenteja de La Armuña, Lenteja de La Armuña
 
 
 
< en:PGI
 
< en:Spanish protected product
 
en: PGI Lenteja Pardina de Tierra de Campos, Lenteja Pardina de Tierra de Campos
 
es: IGP Lenteja Pardina de Tierra de Campos, I.G.P. Lenteja Pardina de Tierra de Campos, Lenteja Pardina de Tierra de Campos
 
 
 
< en:PGI
 
< en:Spanish protected product
 
en: PGI Mazapán de Toledo, Mazapán de Toledo
 
es: IGP Mazapán de Toledo, I.G.P. Mazapán de Toledo, Mazapán de Toledo
 
 
 
en: Pure beef
 
fr: Pur boeuf
 
 
 
en: Pure butter
 
fr: Pur beurre
 
 
 
en: pure cocoa butter, pure cocoa butter chocolate
 
fr: pur beurre de cacao, chocolat pur beurre de cacao
 
 
 
en: Pure juice
 
fr: Pur jus
 
 
 
en: Pure pork
 
fr: Pur porc
 
 
 
en: Rainforest Alliance
 
 
 
en: RSPO, Roundtable on Sustainable Palm Oil, Huile de palme RSPO, Huile de palme durable RSPO
 
 
 
en: superior quality
 
fr: qualité supérieure
 
 
 
en: Sustainable fishery, Sustainable fishing, Sustainable Seafood
 
fr: Pêche durable, pêches durables
 
 
 
< en:Sustainable fishery
 
en: Sustainable Seafood MSC, MSC, Marine Stewardship Council
 
fr: Pêche durable MSC, MSC, Marine Stewardship Council
 
 
 
en: TSG, T.S.G, Traditional Speciality Guaranteed
 
fr: STG, S.T.G, Spécialité traditionnelle garantie
 
es: ETG, E.T.G., Especialidad tradicional garantizada
 
 
 
de: Vegetarisch
 
en: Vegetarian, Suitable for vegetarians
 
es: Vegetariano, Producto vegetariano, Apto para vegetarianos, Vegetarian
 
fr: Végétarien, Convient aux végétariens
 
 
 
< en:Vegetarian
 
de: Vegan
 
en: Vegan, Suitable for vegans
 
es: Vegano, Producto vegano, Vegan
 
fr: Végétalien, Végan, végétal
 
 
 
< en:Vegan
 
en: Vegan Action
 
es: Vegan Action
 
 
 
< en:Vegan
 
en: Vegan Society
 
es: Vegan Society
 
 
 
< en:Vegetarian
 
en: Vegetarian Society
 
es: Vegetarian Society
 
 
 
en: With Sunflower oil
 
fr: A l'huile de tournesol, huile de tournesol
 
es: Con aceite de girasol
 
 
 
fr: 100% muscle
 
 
 
fr: AOC, A.O.C, Appelation d'Origine Contrôlée
 
 
 
fr: au sel de Guérande
 
 
 
fr: Blé français
 
 
 
fr: Bleu Blanc Coeur
 
 
 
fr: Fumé au bois de hêtre
 
 
 
fr: Garantie IPLC, Institut Professionnel du Lait de Consommation, IPLC
 
 
 
fr: Halal
 
es: Halal
 
 
 
fr: Label Rouge
 
 
 
fr: Labels de distributeurs
 
es: Etiquetas de distribuidores
 
 
 
< fr:Labels de distributeurs
 
en: Carrefour Quality, Quality Carrefour
 
fr: Qualité Carrefour, Carrefour Qualité
 
 
 
< fr:Labels de distributeurs
 
fr: Label Carrefour
 
 
 
< fr:Labels de distributeurs
 
fr: Sélection Intermarché
 
 
 
< fr:Labels de distributeurs
 
fr: Testé par le panel test Carrefour, Panel test Carrefour
 
es: Panel Test Carrefour
 
 
 
en: In braille
 
fr: Produit en braille
 
es: En braille, Producto en braille
 
 
 
fr: Produit en Bretagne
 
 
 
fr: Qualité France
 
 
 
fr: Riche en Oméga-3
 
 
 
fr: Salé au sel sec
 
 
 
fr: Sans arachide
 
 
 
fr: Saveurs de l'Année
 
 
 
< fr:Saveurs de l'Année
 
fr: Saveurs de l'Année 2011
 
 
 
< fr:Saveurs de l'Année
 
fr: Saveurs de l'Année 2012
 
 
 
< fr:Saveurs de l'Année
 
fr: Saveurs de l'Année 2013
 
 
 
< fr:Saveurs de l'Année
 
fr: Saveurs de l'Année 2014
 
 
 
fr: Viande Française, VF
 
 
 
< fr:Viande Française
 
fr: Porc Français, porc origine France
 
 
 
< fr:Viande Française
 
fr: Viande Bovine Française, VBF
 
 
 
< fr:Viande Française
 
fr: Viande Porcine Française, VPF, viande de porc française
 
 
 
fr: Volaille française
 
 
 
it: DOC, D.O.C, Denominazione di origine controllata
 
 
 
en:Integrated production
 
es:Producción Integrada
 
 
 
en:Spanish quality label
 
es:Etiquetas de calidad de España
 
 
 
< en:Spanish quality label
 
en:Alimentos de Castilla-La Mancha
 
es:Alimentos de Castilla-La Mancha
 
 
 
< en:Spanish quality label
 
en:Alimentos de Extremadura
 
es:Alimentos de Extremadura
 
 
 
< en:Spanish quality label
 
en:Calidad Certificada
 
es:Calidad Certificada
 
 
 
< en:Spanish quality label
 
en:Etiqueta de Calidad Doñana 21
 
es:Etiqueta de Calidad Doñana 21
 
 
 
< en:Spanish quality label
 
en:Galicia Calidade
 
es:Galicia Calidade
 
 
 
< en:Spanish quality label
 
en:Reyno Gourmet
 
es:Reyno Gourmet
 
 
 
< en:Spanish quality label
 
en:Tierra de Sabor
 
es:Tierra de Sabor
 
 
 
en:Authentic Trappist Product
 
es:Authentic Trappist Product, Producto trapense auténtico
 
 
 
en:Certified Belgian Abbey Beer
 
es:Certified Belgian Abbey Beer, Cerveza belga de abadía, Cerveza belga de abadía certificada
 
 
 
en:Reinheitsgebot
 
de:Reinheitsgebot
 
es:Ley de pureza de 1516, Reinheitsgebot
 
 
 
en: Denominación de Origen
 
es: DO, D.O., Denominación de Origen
 
 
 
en: Denominación de Origen Calificada
 
es: DOCa, D.O.Ca., Denominación de Origen Calificada
 
 
 
en: Vino de Pago
 
es: VP, V.P., Vino de Pago
 
 
 
en: Vino de la Tierra
 
es: VT, V.T., Vino de la Tierra
 
 
 
< en:Vino de Pago
 
< en:Spanish protected product
 
en: VP Campo de la Guardia, V.P. Campo de la Guardia, Campo de la Guardia
 
es: VP Campo de la Guardia, V.P. Campo de la Guardia, Campo de la Guardia
 
 
 
< en:Vino de la Tierra
 
< en:Spanish protected product
 
en: VT Castilla, V.T. Castilla, Vino de la Tierra de Castilla
 
es: VT Castilla, V.T. Castilla, Vino de la Tierra de Castilla
 
  
< en:Denominación de Origen Calificada
 
< en:Spanish protected product
 
en: DOCa Rioja, D.O.Ca. Rioja, Vino de Rioja
 
es: DOCa Rioja, D.O.Ca. Rioja, Vino de Rioja
 
  
< en:Denominación de Origen
+
<Location /cgi>
< en:Spanish protected product
+
SetHandler perl-script
en: DO Montilla-Moriles, D.O. Montilla-Moriles, Montilla-Moriles
+
PerlResponseHandler ModPerl::Registry
es: DO Montilla-Moriles, D.O. Montilla-Moriles, Montilla-Moriles
+
PerlOptions +ParseHeaders
 +
Options +ExecCGI
 +
Order allow,deny
 +
Allow from all
 +
</Location>
  
< en:Denominación de Origen
 
< en:Spanish protected product
 
en: DO Toro, D.O. Toro, Toro, Vino de Toro
 
es: DO Toro, D.O. Toro, Toro, Vino de Toro
 
  
< en:Denominación de Origen
+
<VirtualHost *>
< en:Spanish protected product
+
DocumentRoot /home/obf/html
en: DO Navarra, D.O. Navarra, Vino de Navarra
+
ServerName world.openbeautyfacts.org
es: DO Navarra, D.O. Navarra, Vino de Navarra
+
ErrorLog /home/obf/logs/error_log
 +
CustomLog /home/obf/logs/access_log combined
 +
ScriptAlias /cgi/ "/home/obf/cgi/"
 +
</VirtualHost>
  
< en:Denominación de Origen
+
PerlPostReadRequestHandler My::ProxyRemoteAddr
< en:Spanish protected product
 
en: DO Manzanilla-Sanlúcar de Barrameda, D.O. Manzanilla-Sanlúcar de Barrameda, Manzanilla-Sanlúcar de Barrameda, Manzanilla de Sanlúcar de Barrameda
 
es: DO Manzanilla-Sanlúcar de Barrameda, D.O. Manzanilla-Sanlúcar de Barrameda, Manzanilla-Sanlúcar de Barrameda, Manzanilla de Sanlúcar de Barrameda
 
 
</pre>
 
</pre>

Revision as of 13:44, 4 September 2014

Installation instructions for Product Opener (see Project:Product Opener).

Before you start

Product Opener is not yet released as open source. The instructions below are for reference and for early testers of Product Opener. They are very likely to change as the code will be restructured, made more independent of proprietary code and specific Open Food Facts uses etc.

When it is released, Product Opener will have much easier to use install scripts and instructions.

Install directory

Instructions below use /home/obf for the install directory, replace with your install dir.

Product Opener code

Configuration

startup.pl

This file is used to preload Perl module in Apache. It contains a path that needs to be updated:

# Needs to be configured
use lib "/home/obf/cgi/";

Config.pm

Config2.pm

Contains info about the domain, database and path. This is separated from Config.pm so that it is easy to create test instance that share the same configuration in Config.pm but are on other domains.

# server constants
$domain = "openbeautyfacts.org";

# server paths
$www_root = "/home/obf/html";
$data_root = "/home/obf";

$mongodb = "obf";

MongoDB database

Apache servers

In production we use a light weight Apache web server for static files (e.g. images) that does reverse proxying to a modperl Apache server that dynamically generates the HTML pages.

If the trafic is low or moderate, you can use only one Apache mod_perl server that also serves images etc.

In the example below, the Apache mod_perl server listens on port 19000.

Light-weight reverse proxy for static files

Add to httpd.conf:


<VirtualHost *>
DocumentRoot /home/obf/html
ServerName world.openbeautyfacts.org
ServerAlias *.openbeautyfacts.org

ErrorLog /home/obf/logs/proxy_error_log
CustomLog /home/obf/logs/proxy_access_log combined
ServerAdmin stephane@openbeautyfacts.org

<Directory "/home/obf/html">
    Options -Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>
RewriteEngine on
RewriteCond  %{REQUEST_URI}  !/./
RewriteRule ^(/cgi/.*)$ http://localhost:19000$1 [P,L]
RewriteMap escape int:escape
RewriteRule ^/favicon.ico$ /favicon.ico [L]
RewriteCond  %{REQUEST_URI}  !^/images/
RewriteCond  %{REQUEST_URI}  !^/js/
RewriteCond  %{REQUEST_URI}  !^/rss/
RewriteCond  %{REQUEST_URI}  !^/robots
RewriteCond  %{REQUEST_URI}  !^/clicks/
RewriteCond  %{REQUEST_URI}  !^/data/
RewriteCond  %{REQUEST_URI}  !^/files/
RewriteRule  ^(.*)$ http://localhost:19000/cgi/display.pl?${escape:$1} [P,L,QSA]
</VirtualHost>


<VirtualHost *>
DocumentRoot /home/obf/html
ServerName openbeautyfacts.org
ErrorLog /home/obf/logs/proxy_error_log
CustomLog /home/obf/logs/proxy_access_log combined
DirectoryIndex index.html index.shtml
<Directory "/home/obf/html">
    Options -Indexes FollowSymLinks Includes
    Order allow,deny
    Allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^openbeautyfacts\.org
RewriteRule ^/products$ /products.shtml [L]

</VirtualHost>

modperl Apache server for dynamic pages

  • download the latest version of the source of the Apache httpd server from the 2.2 branch (2.2.29 when writing this)
    • do not use the 2.4 branch as mod_perl is not yet compatible with it
  • extract the source
  • ./configure --with-mpm=prefork --prefix=/home/obf/apache --enable-rewrite --enable-proxy --enable-proxy_http --enable-deflate --disable-userdir --enable-headers
  • make
  • make install
  • download the latest version of mod_perl from http://perl.apache.org/
  • extract the source
  • perl Makefile.PL MP_APXS=/home/obf/apache/bin/apxs
  • make
  • make install

Configuration

In /home/obf/apache/conf/httpd.conf:

Change the port:

Listen 19000

Add at the end:

PerlWarn Off
PerlRequire /home/obf/cgi/startup.pl


<Location /cgi>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
Order allow,deny
Allow from all
</Location>


<VirtualHost *>
DocumentRoot /home/obf/html
ServerName world.openbeautyfacts.org
ErrorLog /home/obf/logs/error_log
CustomLog /home/obf/logs/access_log combined
ScriptAlias /cgi/ "/home/obf/cgi/"
</VirtualHost>

PerlPostReadRequestHandler My::ProxyRemoteAddr