After migration, Moodle is 404?

After migration, Moodle is 404?

by The Bard In Green -
Number of replies: 5

I just migrated our site to a different server.  Actually spawning a clone of it on an in house server for various maintenance and development reasons.  Anyways. . . 

I copied the program and data to the new server and pointed a browser at it to see that the web server was serving it.  

Moodle data permissions error. . . of course, I needed to set the permissions on the new server.  Done.  But apache's working.  Good good.

Database connection errors.  No database yet.  Expected.  I changed config.php to match the new environment and, created and imported the database.

404 error. . . wait wut?

In fact, the site is trying to redirect to the url "192.168.1.190/<a></a>"

Moodle IS in fact supposed to be running at 192.168.1.190 right now.  Somewhere something's grabbing a redirect and spitting out <a></a> as the proper destination url.

What the heck?  How do I even start troubleshooting this.

Average of ratings: -
In reply to The Bard In Green

Re: After migration, Moodle is 404?

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

Operating system? Web server software?

Check very carefully that your config.php settings (particularly wwwroot) match reality. Check your permissions (can the web server read your Moodle files). Check your web server configuration (is it looking in the right place for the Moodle files). 

Check your web server error log for anything that might help. 

In reply to Howard Miller

Re: After migration, Moodle is 404?

by The Bard In Green -

Hello Howard, thank you for responding.

 

OS is Fedora, server is Apache 2.2.17.  Database is MySQL.  I've now quadruple checked config.php and it's all sane.  Apache is logging a "File does not exist" error, telling me /var/www/<a></ a> doesn't exist, which isn't particularly more useful than anything else.  /var/www/ is moodle's web root on this server. Any suggestions?

In reply to The Bard In Green

Re: After migration, Moodle is 404?

by Andrew Davis -

If you shift the Moodle code to another directory and just put a simple index.php file in its place does that file load correctly? I'm just wanting to confirm that your web server setup is working fine as a first step.

In reply to Andrew Davis

Re: After migration, Moodle is 404?

by The Bard In Green -

Update:  I fixed it.  Or a server reboot did, even though multiple apache restarts did not.  Thanks for those of you who weighed in.  I'm currently blaming gremlins.

In reply to The Bard In Green

Re: After migration, Moodle is 404?

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

Show me the full line from your Apache error log??