In a hosted server, where should moodledata go

In a hosted server, where should moodledata go

by Chris Collman -
Number of replies: 6
Picture of Documentation writers
This is a pretty basic question. A webhosting script installed Moodle. I did not run this install script, so it is, what it has been for over a year. This morning I was trying to increase upload file size. I noticed 3 things.

Evidently the config file for Moodle was pointing to the wrong directory ( think I tried to check one of the site administration blocks and got a error message. It was \home\.. and Moodle told me it should be \home1\... In Cpanel this change looked reasonable so it did it. Moodle is still working.

I checked notifications to see which version of Moodle was on this site (1.9.5) and was told "Your site configuration might not be secure. Please make sure that your dataroot directory (/home1/sitedomain/public_html/moodle/uploaddata) is not directly accessible via web." This is moodledata. Ooops.

So I have a www and public_html folders. My guess is that I want to create a folder called /public_html/moodledata. Then copy everything in the ../moodle/uploaddata to the new folder. Then go to config and make the change so it reads /home1/sitedomain/public_html/moodledata.

I am not sure what the www folder is, since at a quick glance it appears to be a mirror of public_html .

For being a wantabe admin, my ignorance of somethings astounds me. However, if I am ignorant, then I know I am not the only one who has the keys to the car but does not know how to put it in reverse smile

Chris


Average of ratings: -
In reply to Chris Collman

Re: In a hosted server, where should moodledata go

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It seems odd to have both a www and a public_html folder. What is in each of them?

I assume that public_html is where the files that make up your web site are.

moodledata absolutely must not be in there.

moodledata should be something like /home1/sitedomain/moodledata - that is, outside public_html.
In reply to Tim Hunt

Re: In a hosted server, where should moodledata go

by Chris Collman -
Picture of Documentation writers
Thanks Tim,
I was not sure about the 2 folders. www is a mirror of public_html, all the folders are the same. I just check the www/moodle/config file that I had not touched, it had the home1 change I made in the public_html/moodle/config file. Must be magic.

I will copy the uploaddata to a place outside of public_html, rename the folder moodledata and adjust the config file in public_html accordingly.

Chris


In reply to Chris Collman

Re: In a hosted server, where should moodledata go

by Chris Collman -
Picture of Documentation writers
Hi Tim,
That works. I had a typo and the stupid computer could not read my mind. The warning is gone.

Next project, update that site from 1.9 to 1.9.7. Deep breath, say the Moodle Mantra 42 times and Bob's your Uncle.

Thanks Chris
In reply to Chris Collman

Re: In a hosted server, where should moodledata go

by Marc Grober -
FYI- typically those directories are linked not mirrored. Do yourself a favor and copy directories and do a mysql backup with phpmyadmin. If something goes wrong will only take 3 minutes to get back to where you started.
In reply to Marc Grober

Re: In a hosted server, where should moodledata go

by Chris Collman -
Picture of Documentation writers
Thanks Marc,
I must have got the Moodle Mantra recited perfectly 42 times. However, I did follow your suggestion, now to figure out how to restore it smile

Chris
In reply to Tim Hunt

Re: In a hosted server, where should moodledata go

by nabil Lachheb -

Hummm... i'm probably late but i just want to share somethings about this question:

"It seems odd to have both a www and a public_html folder. What is in each of them?"

---> Public_html folder and www folder are the same "place". In a hosted server,  where you put your web files in is "public_html", and "www" is a shortcut, like Windows shortcuts.. like a mirror..

Hope this help.

About moodledata: Im wondering if we can have several moodledata folders (moodledata1, moodledata2, ...) in /home/ ?