Bootstrap VM for CPPCMS
Go to https://www.vagrantup.com/downloads.html and download / install vagrant for your system.
Vagrant works with a vm manager, by default you can work with virtualbox.
Go to https://www.virtualbox.org/wiki/Downloads and download / install vagrant for your system.
Clone this repository :
$> git clone https://github.com/42antoine/vagrant-cppcms.git
$> cd vagrant-cppcms
$> vagrant up
$> vagrant ssh
$> cd www
$> ./hello -c config.js
Your server is now running on !
- username : root
- password : vagrant
On the vagrant vm, a web server is installed. You can access it via 127.0.0.1:8080 An "Hello World" cppcms website is available - note that you have to run it to show something!
$> vagrant ssh
$> cd www
$> ./hello -c config.js
You can also use phpmyadmin at this address 127.0.0.1:8080/phpmyadmin
All website content is available from you computer in : vagrant-cppcms/www *(1)
We use Apache2 mod_scgi to pipe CPPCMS website to Apache2 output (port 80 on vagrant). All CPPCMS website have to use the "scgi" API and the port 8080 inside config.js file.
{
"service" : {
"api" : "scgi",
"ip" : "127.0.0.1",
"port" : 8080
},
"http" : {
"script_names" : [ "/hello" ]
}
}
*(1) : On project root directory, you can see "www" directory. This folder is shared from VM, use it to share cppcms source/website with the VM.
At provisionning, the vagrant vm install CPPCMS (1.0.5) and CPPDB (0.3.1). All libraries are stored at this path : /usr
http://cppcms.com http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello