<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Installazione_Multitenant_di_PhpList</id>
	<title>Installazione Multitenant di PhpList - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Installazione_Multitenant_di_PhpList"/>
	<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Installazione_Multitenant_di_PhpList&amp;action=history"/>
	<updated>2026-05-09T18:12:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Installazione_Multitenant_di_PhpList&amp;diff=9891&amp;oldid=prev</id>
		<title>Gabriele.vivinetto: Created page with &quot;* Una sola installazione di Phplist può esere utilizzata per gestire più databsses e configurazioni separate  * Si vuole impostare una gestione del tipo  https://mailing.exa...&quot;</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Installazione_Multitenant_di_PhpList&amp;diff=9891&amp;oldid=prev"/>
		<updated>2016-12-07T17:15:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;* Una sola installazione di Phplist può esere utilizzata per gestire più databsses e configurazioni separate  * Si vuole impostare una gestione del tipo  https://mailing.exa...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* Una sola installazione di Phplist può esere utilizzata per gestire più databsses e configurazioni separate&lt;br /&gt;
&lt;br /&gt;
* Si vuole impostare una gestione del tipo&lt;br /&gt;
 https://mailing.example.com/customer1&lt;br /&gt;
 https://mailing.example.com/customer2&lt;br /&gt;
&lt;br /&gt;
* Creare il master config.php&lt;br /&gt;
&lt;br /&gt;
 sudoedit config/config.php&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
eregi ( &amp;quot;/([a-z0-9_-]{1,})/(.*)&amp;quot;, $_SERVER [&amp;#039;REQUEST_URI&amp;#039;], $regs);&lt;br /&gt;
$liste = $regs[1];&lt;br /&gt;
switch ($liste){&lt;br /&gt;
    case &amp;quot;customer1&amp;quot;:&lt;br /&gt;
    	include_once(&amp;quot;config.customer1.php&amp;quot;);&lt;br /&gt;
    	break;&lt;br /&gt;
&lt;br /&gt;
    case &amp;quot;customer2&amp;quot;:&lt;br /&gt;
    	include_once(&amp;quot;config.customer2.php&amp;quot;);&lt;br /&gt;
    	break;&lt;br /&gt;
   &lt;br /&gt;
    break;&lt;br /&gt;
   &lt;br /&gt;
    default:&lt;br /&gt;
	    die (&amp;quot;This directory not used to run phplist&amp;quot;); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Creare i config dei due customers, prendendo il template ed inserendo i dati del DB di ciscuno:&lt;br /&gt;
 sudo cp config_extended.php config.customer1.php&lt;br /&gt;
 sudo cp config_extended.php config.customer2.php&lt;br /&gt;
&lt;br /&gt;
 sudoedit  config.customer1.php&lt;br /&gt;
 sudoedit  config.customer2.php&lt;br /&gt;
&lt;br /&gt;
* Modificare la definizione del virtualhost apache:&lt;br /&gt;
&lt;br /&gt;
 sudoedit mailing.example.com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ...&lt;br /&gt;
    DocumentRoot /var/www/mailing.example.com/html&lt;br /&gt;
&lt;br /&gt;
    Alias /customer1  /var/www/mailing.example.com/html&lt;br /&gt;
    Alias /customer2  /var/www/mailing.example.com/html&lt;br /&gt;
#...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Accedere agli url, e procedere con la configurazione&lt;br /&gt;
&lt;br /&gt;
* Ricordarsi di impostare il crontab per la gestione della coda come&lt;br /&gt;
&lt;br /&gt;
 sudoedit /etc/cron.d/process-phplist&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#=================================================================&lt;br /&gt;
# CRON JOB FOR COMMAND LINE SCRIPT &amp;quot;phplist&amp;quot;&lt;br /&gt;
# (PHP-cli required)&lt;br /&gt;
# My config.php file has:&lt;br /&gt;
#   $commandline_users = array(&amp;quot;user1&amp;quot;,&amp;quot;user2&amp;quot;,&amp;quot;user3&amp;quot;);&lt;br /&gt;
#   define(&amp;quot;MAILQUEUE_BATCH_SIZE&amp;quot;,200);&lt;br /&gt;
#   define(&amp;quot;MAILQUEUE_BATCH_PERIOD&amp;quot;,3600);&lt;br /&gt;
#   define(&amp;#039;MAILQUEUE_THROTTLE&amp;#039;,5);&lt;br /&gt;
#&lt;br /&gt;
#  Every hour at 15 minutes past, we process the queued messages.&lt;br /&gt;
#  Every day at 1.10 am, we process bounces.&lt;br /&gt;
#=================================================================&lt;br /&gt;
MAILTO=&amp;quot;listreports@rvmgroup.it&amp;quot;&lt;br /&gt;
USER=&amp;quot;www-data&amp;quot;&lt;br /&gt;
PHPLISTPATH=&amp;quot;/var/www/mailing.example.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#m      h       dom     mon     dow     user            command&lt;br /&gt;
*/10    *       *               *               *               www-data      $PHPLISTPATH/phplist-cron -pprocessqueue &amp;gt; /dev/null&lt;br /&gt;
10      1       *               *               *               www-data       $PHPLISTPATH/phplist-cron -pprocessbounces &amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lo script sarà&lt;br /&gt;
 sudoedit /var/www/mailing.example.com/phplist-cron&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# script to run PHPlist from commandline. You may need to edit this to make it&lt;br /&gt;
# work with your shell environment. The following should work for Bash on&lt;br /&gt;
# Fedora Linux but this may vary strongly in other situations. You will need to&lt;br /&gt;
# dig into the code to make sure it works for you.&lt;br /&gt;
&lt;br /&gt;
# in commandline mode, access is restricted to users who are listed in the&lt;br /&gt;
# config file check README.commandline for more info&lt;br /&gt;
&lt;br /&gt;
# identify the config file for your installation&lt;br /&gt;
for CFG in customer1 customer2&lt;br /&gt;
do&lt;br /&gt;
	PHPLISTPATH=&amp;quot;/var/www/mailing.example.com&amp;quot;&lt;br /&gt;
	CONFIG=&amp;quot;${PHPLISTPATH}/config/config.${CFG}.php&amp;quot;&lt;br /&gt;
	export CONFIG&lt;br /&gt;
&lt;br /&gt;
	# alternatively you can use -c &amp;lt;path to config file&amp;gt; on the commandline&lt;br /&gt;
&lt;br /&gt;
	# run the PHPlist index file with all parameters passed to this script&lt;br /&gt;
	/usr/bin/php ${PHPLISTPATH}/admin/index.php -c $CONFIG $*&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Riferimenti=&lt;br /&gt;
*[http://docs.phplist.com/MultipleDatabases.html phplist Documentation: Multiple Databases]&lt;/div&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
</feed>