Niklas Rosencrantz
Niklas Rosencrantz

Reputation: 26652

How can I enable moodle?

I've installed postgres for moodle and I got the following instructions:

Apache/mod_php setup
  • Give full access to the project directory to the process running apache. You might also have to set the x-flag on all .php files. $ chmod -R a+rw * Create a 'moodle.vhost.conf' from moodle.vhost.conf.example in project directory. * Create a symlink from /usr/local/var/moodle to the project directory. $ cd /usr/local/var; ln -s moodle * Also symlink the new virtual host into apache config dir. $ cd /private/etc/apache2/other $ sudo ln -s /moodle.vhost.conf moodle.conf $ sudo apachectl restart * Create your own custom /etc/vcmoodle/config_local.php file for things local to your environment by copying, and modifying if required, the example file. $ sudo mkdir -p /etc/vcmoodle $ sudo cp /config_local.php.example /etc/vcmoodle/config_local.php

Still it won't work. When I look at my apache root then it comes just the standard apache page and no moodle. I've this sites-available

:/etc/apache2/sites-available$ ls
000-default.conf  default-ssl.conf  moodle.conf

and the file moodle.conf contents

<VirtualHost *:80>
   DocumentRoot "/usr/local/var/moodle"
   ServerName moodle.localdev.kth.se

   ErrorLog /usr/local/var/moodle/error_log
   LogLevel debug

   <Directory "/usr/local/var/moodle">
     AllowOverride all
     Order allow,deny
     Allow from 127.0.0.1
   </Directory>
</VirtualHost>

But I don't get a moodle page at my web server. What am I doing wrong?

Upvotes: 3

Views: 685

Answers (1)

DevDonkey
DevDonkey

Reputation: 4880

if youre running Ubuntu (judging by the tag), you need to put your project directory inside /var/www. Apache cant access project folders inside your specified directory unless you change the users/groups etc.

what youve tried is the normal apache default location for web folders, but Ubuntu like to change things.

Upvotes: 2

Related Questions