Apache and PHP running, Moodle not

Apache and PHP running, Moodle not

by Adrian Paulino -
Number of replies: 9

So I have Apache and PhP running, along with PHPMyAdmin. I installed Moodle and it showed the long list of success entries from the databases getting setup, and PHPMyAdmin is able to read Moodle's databases and make queries/etc, but Moodle is not showing up on the localhost page. Any idea why?

I used command line install (Ubuntu- 18.04). I'm running Apache 2.4.29  , PHP 7.2.24, MySql 5.7.29, and Moodle 3.8.2.

It's just weird that PHPMyAdmin can see and manipulate everything from a browser window, but Apache is not getting replaced by the Moodle site, and it's not turning up any of the pages.

Putting an phpinfo page into the main Moodle directory also is not found when I attempt to go to the address.

Thanks for any assistance. I'm near 100% new to Moodle and Linux/Ubuntu.

Average of ratings: -
In reply to Adrian Paulino

Re: Apache and PHP running, Moodle not

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

Hi

What is the "command line install" you mentioned? Could you post the link to that tutorial?

When you say "Putting an phpinfo page into the main Moodle directory also is not found when I attempt to go to the address" what is the address you typed in the browser? Please give the exact one, don't describe!

On "Moodle is not showing up on the localhost page", your Moodle and the browser are in the same (Ubuntu) machine, right? What do you have for $CFG->wwwroot in your moodle/config.php?

In reply to Visvanath Ratnaweera

Re: Apache and PHP running, Moodle not

by Adrian Paulino -
"Try placing the info.php page in /var/www/html" - James S.

The phpinfo works when I do that, and pulls up the various php stuff in the browser window.

"What is the "command line install" you mentioned? Could you post the link to that tutorial?"- Visvanath Ratnaweera


https://docs.moodle.org/38/en/Installing_Moodle - The Terminal in Ubuntu

"When you say "Putting an phpinfo page into the main Moodle directory also is not found when I attempt to go to the address" what is the address you typed in the browser? Please give the exact one, don't describe!" - Visvanath Ratnaweera

My $CFG->wwwroot is http://127.0.0.1/ and after putting the info.php page into the main Moodle directory, I tried to go to http://127.0.0.1/info.php

On "Moodle is not showing up on the localhost page", your Moodle and the browser are in the same (Ubuntu) machine, right? What do you have for $CFG->wwwroot in your moodle/config.php? - Visvanath Ratnaweera

Same machine. CFG- see the answer to the above question.
In reply to Adrian Paulino

Re: Apache and PHP running, Moodle not

by James Steerpike -

So where is your Moodle directory? The usual place is under /var/www/html  (ie /var/www/html/moodle) so the webroot will point to http://127.0.0.1/moodle or http://localhost/moodle

Average of ratings: Useful (1)
In reply to James Steerpike

Re: Apache and PHP running, Moodle not

by Adrian Paulino -
This was the problem. I didn't fully comprehend the technical language of web root directory, and so just installed the Moodle folder into my main user folder. It's up and running now. Thanks!
In reply to Adrian Paulino

Re: Apache and PHP running, Moodle not

by James Steerpike -

Cool.  Your setup is fine for a local host but If you do go to a server with a public domain and want to run RTC to record audio or video within Moodle, have a look at Apache virtual hosts. It uses LetsEncrypt to give a certificate for https connections.

Always good to see someone tackle Linux through the command line.


In reply to Adrian Paulino

Re: Apache and PHP running, Moodle not

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

My $CFG->wwwroot is http://127.0.0.1/

I wonder whether the trailing slash is necessary.

after putting the info.php page into the main Moodle directory,

Which is?

I tried to go to http://127.0.0.1/info.php

If you have done everything else right, the problem could be in file/directory permissions. What are the outputs of 'ls -ld /your/main/moodledirectory' and 'ls -l /your/main/moodledirectory'?

In reply to Adrian Paulino

Re: Apache and PHP running, Moodle not

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What does "not showing up" mean? What does the page show? (remember, even a blank page is diagnostic, it's *something*)
In reply to Adrian Paulino

Re: Apache and PHP running, Moodle not

by Ken Task -
Picture of Particularly helpful Moodlers

Mind sharing what the URL to phpmyadmin looks like?

Is it something like http://localhost/phpmyadmin/ or is it http://IPaddressNOT127.0.0.1/phpmyadmin/

The only way localhost or 127.0.0.1 will work is where the browser being used is in the graphical desktop of the server itself.

While CLI directions are given on https://docs.moodle.org/38/en/Installing_Moodle it doesn't mention what to type when prompted for the URL to server ... which goes into the newly created config.php file upon install.

IF OP entered http://localhost then the only browsers that can access the moodle have to run from the desktop of the server.  localhost or 127.0.0.1 is what's called the 'loopback'. https://en.wikipedia.org/wiki/Localhost

Normally, one *should* enter https://thefullyqualifieddomainname of the server.

Unless all of Internet has changed IPv4 networking now and 127.0.0.1 is remotely accessible by any browser on any workstation in the globe! :|

'SoS', Ken