test moodle on localhost

test moodle on localhost

by Paul Holland -
Number of replies: 3

Hi I was wondering if someone could give me a push in the right direction. I am a student who is potentially going to be employed to update the moodle site at my university. I have very minimal experience with php mysql and the likes but i do consider myself a fairly advanced computer user. Im currently running ubuntu 11.04 as my main desktop and would like to set it up to run as a local moodle server so i can play around with creating courses etc which i will likely be doing for my school in the future. I tried following the install instructions on the wiki and various tutorials around the web but did not have much luck. I am able to install moodle from the ubuntu software centre/synaptic and also download the LAMP packages. I seem to fail when I try to access http://localhost/moodle/install.php or any of the similar initial addresses. I simply get a 404 error from apache. I feel like its something very basic that I am missing, perhaps changing a config file to point apache in the right place?? I just cant for the life of me think of how to go about this. If anyone has experiencing setting up local moodle servers and thinks they could help I would be very grateful.

 

Thanks for your time!!

 

-Paul

Average of ratings: -
In reply to Paul Holland

Re: test moodle on localhost

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You don't say which instructions you followed. Anyway this is how you could debug:

- Watch the Apache error log (sudo tail -f /var/log/apache2/error.log) as you visit http://localhost/moodle/. It will say something like "/var/www/moodle/ not found".

- Check whether you have that directory with Moodle source in it.

- If yes, find out why Apache can't see it. Permissions, for example?

- If no, see where your Moodle sources have gone and why Apache is looking in the wrong place. Relevant configuration files /etc/apache2/apache2.conf, /etc/apache2/sites-enabled/*.

- and so on.

In reply to Visvanath Ratnaweera

Re: test moodle on localhost

by Paul Holland -

Thanks for your quick reply!

http://docs.moodle.org/en/Step-by-step_Installation_Guide_for_Ubuntu

is the guide I tried to follow - among others. I tried tinkering a bit more and found that when I ran terminal and attempted to access the moodle config page and as you said I got an output about:

 

client 127.0.0.1 File does not exist: /var/www/moodle   /var/www/favicon.ico

 

this makes me think that somehow I've messed up in setting up the moodlevirtualhost flle, I followed all the directions on the page I listed above, and when I open the apache config files you mentioned I do not see anywhere that points to either /var/www/moodle or /usr/share/moodle (the apparent location of my moodle install)

Any further thoughts?

 

Thanks so much again

 

-Paul

 

In reply to Paul Holland

Re: test moodle on localhost

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

> http://docs.moodle.org/en/Step-by-step_Installation_Guide_for_Ubuntu
> is the guide I tried to follow - ...

Sorry, you have to be more specific. That guide for example mentions two alternatives:
- http://docs.moodle.org/en/Step-by-step_Installation_Guide_for_Ubuntu#Installation_from_a_package_manager
- http://docs.moodle.org/en/Step-by-step_Installation_Guide_for_Ubuntu#Installation_from_the_command-line_interface

And what ist the Ubuntu version you have? What repositories have you activated (from /etc/apt/sources.list)?

> among others.

That is a bad idea. Who is the cook?

> I tried tinkering a bit more and found that when I ran terminal and attempted to access the moodle config page

It would be useful to have an idea what sort of tinkering that was.
;-(

> and as you said I got an output about:
>
> client 127.0.0.1 File does not exist: /var/www/moodle /var/www/favicon.ico
>
> this makes me think that somehow I've messed up in setting up the moodlevirtualhost flle, I followed all the directions on the page I listed above, and when I open the apache config files you mentioned I do not see anywhere that points to either /var/www/moodle or /usr/share/moodle (the apparent location of my moodle install)
>
> Any further thoughts?

It must be an Apache configuration issue. Without knowing the relevant files, /etc/apache2/apache2.conf, /etc/apache2/sites-enabled/*) I can not make any statements. If you let me know the Ubuntu version and the repos you use as requested at the top, I could do a test run on a virtual machine.