I am installing moodle in rhel instance. I want to keep the directory 'moodle' outside of the /var/www/http. I followed this documentation. In order to define the moodle directory, I updated the /etc/httpd/conf/httpd.conf
file as following:
<Directory "/usr/moodle_dir/moodle">
DirectoryIndex index.php
AcceptPathInfo on
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Alias /moodle "/usr/moodle_dir/moodle"
All moodle contents are in the moodle directory. I disabled the SELinux by setenforce 0
.
I set the file permission as :
chown -R apache:apache /usr/moodle_dir
When I hit the URL in the browser it says
You don't have permission to access /moodle on this server.
Can anyone let me know please where the issue is ? (when I put the moodle directory inside www/http, then moodle page was loaded in browser.) Php version 7.3, rhel: 7.7. Moodle 3.8.2 [ the latest]
UPDATE:
I added created a directory inside /var/www/html/test and updated the <Directory
entry and Alias
accordingly. Then it worked. That means, the directory reference is working. There is something else blocking httpd to access an outside www/html directory.