TheFopp Posted September 24, 2009 Posted September 24, 2009 Hi guys Currently run Moodle on a WAMP server and it works well, but there are a couple of modules (particularly the one the allows access to students home folders through Moodle) that we'd like to use that require Moodle to be running on a LAMP box. So thought I'd have a play with setting up a Moodle install on an Ubuntu vm. Got Ubuntu Server install (version 9. something), told it set up the system as a LAMP server when it asked. Told it that the webpages served by Apache should be seen by other PCs not just the localhost Installed Moodle using sudo apt-get install moodle and it appeared to install that fine. I can browse to //localhost/ on the Ubuntu server and see the IT WORKS! page and I can browse to the IP from other PCs and see the IT WORKS! page so Apache seems to be working. I can't however see anything other than a blank page when browsing to //localhost/moodle or //localhost/moodle/admin (don't get an error page 404 etc, just a blank page) I installed GNOME to have a look around the directory and found the Moodle files and been installed in USR/SHARE not VAR/WWW/MOODLE where I would have expected them so created a folder there, copied the moodle files to it and CHMOD 777 the VAR/WWW/MOODLE folder. Still nothing. As this is my first time with Linux I'm a bit stuck, and not sure what I've done wrong. PHP seems to be installed, don't know about MySQL, but it seems odd that I can't open //localhost/moodle/index.php at all from the browser. Can anyone with any experience of setting up Moodle on Ubuntu help please?
powdarrmonkey Posted September 24, 2009 Posted September 24, 2009 (edited) I installed GNOME to have a look around the directory and found the Moodle files and been installed in USR/SHARE not VAR/WWW/MOODLE Correct; it's not the package system's job to guess where the administrator wants them to appear. where I would have expected them so created a folder there, copied the moodle files to it and CHMOD 777 the VAR/WWW/MOODLE folder. Bad! Other parts of moodle assume it can be found where it was installed. Instead of copying the files, remove the directory you created and link to moodle instead: sudo rm -r /var/www/moodle sudo ln -s /usr/share/moodle /var/www/moodle Substitute /usr/share/moodle for the right path if my memory has failed me. Edited September 24, 2009 by powdarrmonkey ln -s requires sudo
TheFopp Posted September 24, 2009 Author Posted September 24, 2009 Thanks powerdermonkey I've deleted the copy of the moodle folder i put into /var/www and run the code to link usr/share/moodle to /var/www/moodle as suggested I still get the same blank screen. Is it odd that I get a blank screen. If I try to browse to a file that isn't there e.g. //localhost/moodle/nothere.php I get Not Found error 'requested URL //localhost/moodle/nothere.php was not found on this server' but if i browse to a file in the moodle directory that should be there e.g. //localhost/moodle/index.php I just get a blank screen, but the index.html file in the www/var directory can be viewed properly. I'm wondering if PHP isn't doing its thing?
TheFopp Posted September 24, 2009 Author Posted September 24, 2009 Have just tried browsing to one of the image files in the moodle folder and they appear in the browser fine (//localhost/moodle/theme/chameleon/pix/a/em1_bwgreater.gif). So I'm guessing it almost definately a PHP issue?
powdarrmonkey Posted September 24, 2009 Posted September 24, 2009 Check you have carried out any configuration steps listed in /usr/share/doc/moodle/README.Debian. The Apache logs are /var/log/apache2/access.log and /var/log/apache2/error.log by default, check them. I suspect you don't have a handler registered for .php files, can you access one by name at http://localhost/moodle/...?
TheFopp Posted September 24, 2009 Author Posted September 24, 2009 Done the config steps in the readme except for commenting out the skip-network bit in the mysql file although I think it is now a bind to 127.0.0.1 comment not skip-network. Shouldn't make any difference if doing it trying to browse from the LAMP server anyway. I think it must be the php handler not registered. The only error in the logs are that it can't find a favicon.ico in var/www Browsing directly to a php file e.g localhost/moodle/index.php just gives a blank screen. How would I register the handler for php? Sorry if not making good sense as currently on train and can't remember exact things that server was showing!
budgester Posted September 24, 2009 Posted September 24, 2009 Check your apache config. Try running some of the php scripts using php cli What do the apache access logs say ? In /var/log/apache2/
TheFopp Posted September 25, 2009 Author Posted September 25, 2009 Check your apache config. Try running some of the php scripts using php cli What do the apache access logs say ? In /var/log/apache2/ Apache logs say 127.0.0.1 - - [24/Sep/2009:16:30:38 +0100] "GET /moodle/admin HTTP/1.1" 301 274 "-" "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.14) Gecko/2009090216 Ubunto/9.04 (jaunty) Firefox/3.0.14" Everytime I try to access any file through the browser I get pretty much the same thing just with a different timestamp and different filename if i try a different file. The only error I get in the error log is [Thu Sep 24 16:30:41 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico With just a different timestamp each time I try to access moodle.
powdarrmonkey Posted September 25, 2009 Posted September 25, 2009 Please paste the outputs of sudo ls -la /etc/apache2/mods-enabled cat /etc/apache2/mods-enabled/dir.conf
TheFopp Posted September 25, 2009 Author Posted September 25, 2009 administrator@CSM-Moodle:~$ sudo ls -la /etc/apache2/mods-enabled [sudo] password for administrator: total 8 drwxr-xr-x 2 root root 4096 2009-09-23 13:32 . drwxr-xr-x 7 root root 4096 2009-09-23 13:32 .. lrwxrwxrwx 1 root root 28 2009-09-23 13:32 alias.conf -> ../mods-available/alias.conf lrwxrwxrwx 1 root root 28 2009-09-23 13:32 alias.load -> ../mods-available/alias.load lrwxrwxrwx 1 root root 33 2009-09-23 13:32 auth_basic.load -> ../mods-available/auth_basic.load lrwxrwxrwx 1 root root 33 2009-09-23 13:32 authn_file.load -> ../mods-available/authn_file.load lrwxrwxrwx 1 root root 36 2009-09-23 13:32 authz_default.load -> ../mods-available/authz_default.load lrwxrwxrwx 1 root root 38 2009-09-23 13:32 authz_groupfile.load -> ../mods-available/authz_groupfile.load lrwxrwxrwx 1 root root 33 2009-09-23 13:32 authz_host.load -> ../mods-available/authz_host.load lrwxrwxrwx 1 root root 33 2009-09-23 13:32 authz_user.load -> ../mods-available/authz_user.load lrwxrwxrwx 1 root root 32 2009-09-23 13:32 autoindex.conf -> ../mods-available/autoindex.conf lrwxrwxrwx 1 root root 32 2009-09-23 13:32 autoindex.load -> ../mods-available/autoindex.load lrwxrwxrwx 1 root root 26 2009-09-23 13:32 cgi.load -> ../mods-available/cgi.load lrwxrwxrwx 1 root root 30 2009-09-23 13:32 deflate.conf -> ../mods-available/deflate.conf lrwxrwxrwx 1 root root 30 2009-09-23 13:32 deflate.load -> ../mods-available/deflate.load lrwxrwxrwx 1 root root 26 2009-09-23 13:32 dir.conf -> ../mods-available/dir.conf lrwxrwxrwx 1 root root 26 2009-09-23 13:32 dir.load -> ../mods-available/dir.load lrwxrwxrwx 1 root root 26 2009-09-23 13:32 env.load -> ../mods-available/env.load lrwxrwxrwx 1 root root 27 2009-09-23 13:32 mime.conf -> ../mods-available/mime.conf lrwxrwxrwx 1 root root 27 2009-09-23 13:32 mime.load -> ../mods-available/mime.load lrwxrwxrwx 1 root root 34 2009-09-23 13:32 negotiation.conf -> ../mods-available/negotiation.conf lrwxrwxrwx 1 root root 34 2009-09-23 13:32 negotiation.load -> ../mods-available/negotiation.load lrwxrwxrwx 1 root root 27 2009-09-23 13:32 php5.conf -> ../mods-available/php5.conf lrwxrwxrwx 1 root root 27 2009-09-23 13:32 php5.load -> ../mods-available/php5.load lrwxrwxrwx 1 root root 31 2009-09-23 13:32 setenvif.conf -> ../mods-available/setenvif.conf lrwxrwxrwx 1 root root 31 2009-09-23 13:32 setenvif.load -> ../mods-available/setenvif.load lrwxrwxrwx 1 root root 29 2009-09-23 13:32 status.conf -> ../mods-available/status.conf lrwxrwxrwx 1 root root 29 2009-09-23 13:32 status.load -> ../mods-available/status.load administrator@CSM-Moodle:~$ administrator@CSM-Moodle:~$ cat /etc/apache2/mods-enabled/dir.conf DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
rbelew Posted November 4, 2009 Posted November 4, 2009 hi TheFopp, i seem wedged at exactly the same spot as you. your exchange with powdarrmonkey seemed productive, until about a month ago. did you ever figure out what was up? i have just your symptoms. rik
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now