Moodle 2.9.1+ - Cannot Get Apache to Show Moodle Pages to local subnet

Moodle 2.9.1+ - Cannot Get Apache to Show Moodle Pages to local subnet

by Zachary Winter -
Number of replies: 2

Hey all - I really could use some help getting Apache to serve up Moodle pages.  I'm convinced I'm not configuring httpd.conf properly, but nothing I've checked has resolved my problem.


Some info:

 - Running the following:

         Server version: Apache/2.4.6 (CentOS)

         Server built:   Mar 12 2015 15:07:19

         CentOS Linux release 7.1.1503 (Core)

         3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

- Moodle Version is 2.9.1+



I've attempted configurations as follows:


- Moodle should be served out of this directory:
         DocumentRoot "/var/moodle/www"

- this directory had these commands run:

         68  chown -R apache:apache /var/moodle

         69  chmod -R 755 /var/moodle

- I have attempted various combinations with the following configurations in httpd.conf (I have root access):


<Directory />

DirectoryIndex index.php

AcceptPathInfo on

AllowOverride None

Options None

Order allow,deny

Allow from all

</Directory>

Alias /moodle "/var/moodle/www"


<VirtualHost *:80>

    ServerAdmin webmaster@site

    DocumentRoot /var/moodle/www

    ServerName internal.namespace.com

    CustomLog logs/internal.namespace.com_log combined

</VirtualHost>



And I never actually get a Moodle page. All I ever get are 403 Forbidden errors and, when I attempt to type out http://192.168.1.19/moodle/index.php or http://localhost/moodle/index.php, I get a 404.  

I do not know what else to change.  I have since blown away the old httpd.conf and replaced with a default one to start clean.  Can anyone point me in the right direction about how to get Apache to actually cooperate?

Average of ratings: -
In reply to Zachary Winter

Re: Moodle 2.9.1+ - Cannot Get Apache to Show Moodle Pages to local subnet

by Paul Verrall -

What messages are you seeing in Apache's error log file?

In reply to Zachary Winter

Re: Moodle 2.9.1+ - Cannot Get Apache to Show Moodle Pages to local subnet

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That's an Apache 2.2 (or earlier) httpd.conf file. They changes the access control syntax in a bit in 2.4 and that, I think, is why you cannot access pages with those settings...

See... http://httpd.apache.org/docs/2.4/upgrading.html

...especially the bit under the heading 'Access control'