[TYPO3-english] test and production on 1 VPS server
Dominique Feyer
dominique.feyer at reelpeek.net
Thu Apr 9 00:43:56 CEST 2009
On 2009-04-07 17:32:18 +0200, Bas Heutink <webdesign at inbalanshasselt.nl> said:
> Hello list,
>
> Is it necessary to test Typo3 sites on a completely different (VPS)
> server? Or is it okay to test Typo3 on the same VPS server as the
> production environment? Of course the production websites have their
> own account in WebHostManager and the test website has also its own
> account in WebHostManager.
>
> So the test website and the production websites have different
> databases etc... But they share the same mysql and apache server
> because they are on the same VPS server.
>
> So the only thing is that production and test share the same
> mysql/apache server. Is this a risk? In other words can a Typo3 test
> site crash a complete myqsl/apache server? In that case there is a
> risk... Also in that case shared hosting is also in anyway
> inacceptable, because you then also share mysql/apache server with
> other clients, and these clients can let crash mysql/apache...
It's not a good idea to have to different TYPO3 accessing the same database.
But you can use a simple PHP switch, like that:
switch((string) $TYPO3_CONF_VARS['SYS']['rp_env']) {
case 'development':
$typo_db_username = 'typo3_dev';
$typo_db_host = 'localhost';
$typo_db = 'typo3_reelpeek_dev';
$typo_db_password = '*****';
break;
case 'production':
$typo_db_username = 'typo3_prod';
$typo_db_host = 'localhost';
$typo_db = 'typo3_reelpeek_prod';
$typo_db_password = '*****';
break;
And you just need to change the value of
$TYPO3_CONF_VARS['SYS']['rp_env'] on the staging and the production
I use this kind of setup on many dev, staging/test, production
environnement with different setup (all one the same VPS, one server
for each one, ...)
One good thing with tihis setup, is that you can active debug on the
test, but not on production, have different location for GM, ...
See you,
Dominique Feyer
> Regards,
>
> Bas
More information about the TYPO3-english
mailing list