404 error - index.php not found

404 error - index.php not found

by B K -
Number of replies: 4
Hi folks

When i click login to moodle - it's not working anymore: it comes up with a 404 error. I suspect this is because i deleted an "index.php" file but i'm not sure where i deleted it from.
when i go to var/www/html/moodle/login  there is an index.php file right there.

the same thing with var/www/html/moodle - there is an index doc right there.

Would anybody have any ideas? Or should i push for a fresh install.

thanks for your help.

BK





Average of ratings: -
In reply to B K

Re: 404 error - index.php not found

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

Why do you think you deleted an index.php? Seems unusual.


If you have any doubt about the moodle code files then replace the entire installation with a clean copy. You just need to copy config.php from the old version to the new. Your database and uploaded files will not be effected. 

In reply to Howard Miller

Re: 404 error - index.php not found

by B K -

thanks for your response guys, i do appreciate it.


I listened to my old man's advice on this one............but now that i think about it, it could be a problem with the apache config file - he did make some fairly significantly changes to it.


would any of you folks have another copy of the apache config file hand? that would be great if so.


cheers


BK

In reply to B K

Re: 404 error - index.php not found

by Ken Task -
Picture of Particularly helpful Moodlers

Download the zip of the version of Moodle you have.   Unzip it locally.   On the server rename index.php to index.php-edited.   Upload the index.php file contained in the un-zipped freshly downloaded Moodle code folder.   Change ownership/permissions on the index.php flie such that apache user can read it.

Try hitting your Moodle with browser.   If it works, might want to compare the hacked index.php file ... the one you renamed to index.php-edited by downloading and opening it with a text editor.

If you have linux command line a diff command will show differences between two files:

At location of index.php-edited and index.php:

diff index.php-edited index.php

man diff for help on diff command.

'spirit of sharing', Ken

In reply to B K

Re: 404 error - index.php not found

by Robert Brenstein -
Is there index.php in the main Moodle folder? That is the one you likely deleted.