Configuration |
If a security manager is enabled (this is for instance the case by default with Ubuntu 9), the web application has to be authorized to do local connections to mySQL, as well as reading the website files, use the indexation files for search queries on the website, and use certain classes : create a file named tomcat6/conf/policy.d/paellos.policy, with (by changing "SITENAME", "serveur.smtp", "/var/www" and ".../index_lucene" if necessary) :
grant codeBase "file:${catalina.base}/webapps/SITENAME/-" { permission java.net.SocketPermission "localhost:3306", "connect,resolve"; // access to the SQL database permission java.net.SocketPermission "smtp.exemple.fr:25", "connect,resolve"; // sending emails permission java.io.FilePermission "/var/www/webjaxe/-", "read"; // reading WebJaxe files permission java.io.FilePermission "/var/www/public", "read"; // generating the public website permission java.io.FilePermission "/var/www/public/-", "read,write,delete"; // generating the public website permission java.io.FilePermission "${catalina.base}/webapps/SITENAME/WEB-INF/sites", "read"; // training websites permission java.io.FilePermission "${catalina.base}/webapps/SITENAME/WEB-INF/sites/-", "read,write,delete"; // training websites permission java.io.FilePermission "${catalina.base}/webapps/SITENAME/WEB-INF/index_lucene/-", "read,write,delete"; // indexation files permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.compiler"; // jsp compilation permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.compiler.*"; // jsp compilation };
# warning: with Apache 2, do not use AddModule, and replaced httpd by apache2 in the paths AddModule mod_jk.c <IfModule mod_jk.c> JKLogFile /var/log/httpd/mod_jk.log JKWorkersFile /etc/httpd/workers.properties JKMount /SITENAME/* PAELLOS </IfModule>
and workers.properties should be added next to it (if it already exists, it should be combined).
In each Virtualhost (typically the files in sites-enabled), the following code must be added :
<IfModule mod_jk.c> JkMountCopy On </IfModule>
On Tomcat side, a matching connector is required to listen to incoming queries, as described in the exemple_pour_tomcat_6_de_server.xml file included in PAELLOS
mysql -u root -p > GRANT ALL ON NOMSITE.* TO adminPAELLOS@localhost IDENTIFIED BY "my_password"; > quit (the password must be the one in ServletProperties)
To start using the site, the administrator must register as described in the administration documentation.