Moodle stoped working after apache upgrade

Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
Number of replies: 17

Hello ,

I was trying to install an ssl certificate in a server. I had to restart apache to finish the procedure, but couldn't do that (some error message was returned). After a little search i decided to reinstall apache.

The problem is that after that i could not access moodle site. 

The server runs on ubuntu 18.04.6

Php version is 7.2.24

Moodle version is 3.7.2+ (Build: 20190913)

MariaDB is Ver 15.1 Distrib 10.4.22

I've checked MariaDB is enabled. I've also made a simple php info file, placed it inside moodle directory, pointed my browser to it and it shows (so i guess php warks too).

Does anyone have any suggestion? I would be gratefull.

Average of ratings: -
In reply to Τζέτζιας Χρήστος

Re: Moodle stoped working after apache upgrade

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
How the broken Moodle site looks like is important. Please attach a screenshot. You may shade any sensitive information.

And when you say phpinfo shows, do you mean something like this https://moodle.org/mod/forum/discuss.php?d=457797#p1838548 ?

One possibility is the upgrade process somehow removed critical PHP components. The above screenshot and phpinfo are the starting points of the search.
In reply to Τζέτζιας Χρήστος

Re: Moodle stoped working after apache upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Would have helped if we had more info on "some error"!

So we now have to play 25 questions ... sad

So the phpinfo page works ... by http:// or https://

Did you go after a commercial certificate?   Which Certificate Authority (CA)?

Name and URL please.   Note that one might not be able to use a global *.FQDN certificate.

Those require you to gen a CSR - certificate signing request - that you submit to them.   There is the server key which is unique to your server.

What files you download from the CA have to be referenced in config of apache and the modulus of the cert (.crt file) and the server .key must match.

And the crts (files) you get from CA + you .key file must be placed in appropriate httpd config directories.

OR did you attempt a LetsEncrypt cert?

And, last but not least, one has to change config.php file of moodle to point to https://site rather than http://site.   Might also have to run the httpsreplace tool found in admin/tool/

'SoS', Ken

In reply to Ken Task

Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
Thank you both, Ken and Visvanath for your answers. Sorry if not being specific enough.
So, the info file's address is http://e-learning.cff-e-edu.gr/moodle/version1.php
It works only by http:// When i attempt to visit http://e-learning.cff-e-edu.gr/moodle i get white page, no message.
My CA is Sectigo. I generated CSR for them, made an identification proccess and then recieved some files. It is probable that i haven't placed them correctly (i will look into it), but still, if that's the problem does it explain the wite page?
In reply to Τζέτζιας Χρήστος

Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
Update: Just edited moodle's config file to point to http instead of https. Now site displays ok, but my credentials do not work in normal firefox, though they work if I open moodle in firefox private tab..
Does it meen that it's not  a moodle thing and that the problem is in the ssl configuration?
In reply to Τζέτζιας Χρήστος

Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Hmmm ... the ice burg gets deeper! sad

In your server firewall, is port 443 open?

Just did an nmap at your server:

nmap -P0 -p 80,443 e-learning.cff-e-edu.gr

PORT    STATE    SERVICE
80/tcp  open     http
443/tcp filtered https

shows 443/tcp port is filtered ... should say open.

So check firewall on server.

https://ubuntu.com/server/docs/firewalls

And server is in need of an upgrade:

=== 3.6 ===

Much more work needs to be planned.

See Mr. V's chart:

http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases

Hmmmm ... @Mr. V ... why is your site not running https? :|

Suggest also turning on debugging to the max to what else your server is complaining about.

You say it's a 3.7 ... are you sure?

From command line located in moodle directory:

fgrep '$release' ./version.php

will show version and build date.

'SoS', Ken

In reply to Ken Task

Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
It seems somehow ufw was disabled. I enabled it, made sure 443 is open. Still, nmap -P0 -p 80,443 e-learning.cff-e-edu.gr shows "filtered". I'll try to find more about it.
In reply to Τζέτζιας Χρήστος

Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Have you cleared your Firefox cache?
In reply to Rick Jerz

Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
Hi Rick, thanks for the answer. No, I did not. However i installed and run a new browser, so i guess it's about the same. Also, in such cases I usually open private tabs. I'll keep in mind to clear the cache from now on. Good reminder.
In reply to Τζέτζιας Χρήστος

Re: Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Your problem seems to be with your Firefox, not Moodle since you can log into Moodle from a private tab. When these things happen to me, I have around 8 browsers where I can try. You might want to try logging into your Moodle from a friend's computer.
 
Another possibility is that you have a bookmark for your Moodle, and your bookmark was created and still uses http://.  You might need to edit that bookmark.
In reply to Rick Jerz

Απάντ: Re: Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
Indeed, after using a different browser, everything is ok (at http:\\) Thanks.
In reply to Τζέτζιας Χρήστος

Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> Just edited moodle's config file to point to http instead of https. Now site displays ok, but my credentials do not work in normal firefox, though they work if I open moodle in firefox private tab.

Now that "do not work" means the red "Invalid login, please try again" message, I assume. Have never come across such a situation except for stale caches, on the browser-side or server-side, e.g. moodledata/muc/config.php. If those causes are eliminated you must be doing something complicated in your network, like CDN or an own network proxy or a network filter. Network comes before the service, and the people here are from the service part, I mean Moodle.
In reply to Visvanath Ratnaweera

Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
Thanks for the answer. It seems it was a bowser problem. Everything works fine in another browser (at http:\\)
In reply to Τζέτζιας Χρήστος

Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Ken Task -
Picture of Particularly helpful Moodlers
In reply to Ken Task

Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -
Thanks Ken. I cannot work on the problem at the moment but I will look it as soon as possible.
In reply to Τζέτζιας Χρήστος

Re: Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Uhhh ... http:\\???!!!! Really?

Me thinks you are too Windows oriented! smile

Certificates and server for them are on port 443 which would mean https://

Note the slashes lean to the righ! smile

'SoS', Ken

In reply to Ken Task

Απάντ: Re: Απάντ: Re: Απάντ: Re: Moodle stoped working after apache upgrade

by Τζέτζιας Χρήστος -

smile Haven't use windows for a long time, neither on server nor on pc. However, it's true i have a problem with slashes!

In reply to Τζέτζιας Χρήστος

Club of "Haven't used windows for a long time" [OT]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Welcome to the Club of "Haven't used windows for a long time"!

>> slashes lean to the right! smile




Yep, the pre-predecessor of MS-DOS wanted to make it look different from Unix and changed the direction of the slash. https://en.wikipedia.org/wiki/MS-DOS#History. The world inherited it through Bill Gates and living happy ever.