Ideally where should one put the MultiChain Web Demo files if multiple nodes on the same server are to transact?

+1 vote
I am a bit puzzled about how to optimize Multichain web demo for a production site. With the current set up i have the folder in the public html. I want nodes on my server to transact, should I keep all WebDemo files in the public html or what. It it a secure option to do so?
asked Feb 2, 2017 by makoya
How did you get the webdemo up?

I have downloaded it and read the but I have no idea how to deploy
You need to put it in your web directory to start with. For instance if you are using Ubuntu , put the folder in www/html.
Next you have to edit the edit the configuration file, rename example.conf.txt it to conf.txt an edit the parameters to match rpc user, password, port for your chain.
Then open browser and locate where you put it, e.g localhost/webdemo

1 Answer

+1 vote

You should have a separate Web Demo URL for each node. If you're planning to use this in production, it's vital that you move the config.txt file somewhere else, since by default it is accessible by the web server. In fact, depending on how your servers are set up, you may be able to share almost all of the files between the installations, apart from config.txt, which should be different for each node.

answered Feb 3, 2017 by MultiChain
If I move the config.txt to somewhere I start getting erros, so how is this actually done for the set up to locate the directory where I put the config.txt file
Yes, you need to adjust the PHP code to load the config.txt file from elsewhere. See the read_config() function in the functions.php file.
I tried editing this line to point to a path in my home directory:
But it seems not to point to it on the other end.
There may be PHP settings which prevent this reading of a file from an outside directory. Please look in your web server error_log for more information on why the change did not succeed.