I am New to moodle
i have followed some article and install moodle 3.4 on centos 7 using VM workstation and it worked fine but i need some help in having another instance on the same server,
can you help please
Would help if you would provide the link to 'some article' so others could look at it. Otherwise, many questions/back and forth, etc.
'spirit of sharing', Ken
i have install moodle following this link
and once finished every thing work fine,
now i want to clone a copy of moodle folder with deferent name in /var/www/html
and change the config.php inside it to point to ipaddress/new folder name
but this dosnt work
You need to also create a new moodledata folder and database and then change the config.php file to reflect that.
It's the '5.3 Setup of virtual host for Moodle' that's tripping you up.
In that tutorial/how to it assumes you want each instance of whatever to use a different Fully Qualfied domain name.
The default virtualized site document root is curently set/in /var/www/html/moodle/
If you were change that back to /var/www/html/
And check/edit the config.php file in /var/www/html/moodle/ to make sure it's pointed to http://IP_address/moodle Make sure it works ... can login, etc.
then one could clone the code directory to something like moodle2.
cp -rp moodle moodle2 (dups the code)
cd /var/www/ ... this is where moodledata resides
cp -rp moodledata moodle2data (this dups the data directory)
Then create a new fresh database for moodle2. Import into moodle2 DB an sql dump from the first install of Moodle OR just do a new install - since you have no content yet.
Edit the config.php file in moodle2 for all the changes ... DB user, DB pass could remain the same *IF* you have set up the second database to use the same credentials. In this case, might be best to use the 'superuser' credentials for both instances of moodle.
Also edit the URL: http://IP_address/moodle to http://IP_address/moodle2
That way ... the base url to your site is http://IP_address/ ... which right now would/should beget the welcome screen until you put and index.html file in /var/www/html/ That file has two links ... one to /moodle/ and one to '/moodle2/.
To access directly, http://IP_address/moodle/
** Now if these are to be productions would highly recommend setting up *true* DNS entry so that the site is accessed via http://FQDN/
And, Moodle is moving towards requiring https ... so that's another consideration ... that would have to be addressed right after getting a valid FQDN for the server ... a true certificate from a CA.
Despite what directions one might find for installing Moodle, IF I know the site will be accessed from the internet by FQDN, I'll do that step first - DNS. Then get a valid CA for the server and make sure the server responds to access on port 443 ... *even before I begin a fresh install of a Moodle*.
'spirit of sharing', Ken
Just repeat the process but change the folder and database names.
Then you just need to tell apache which folder the new site is in so that you can access it.