Folder Duplication in URL path (/moodle/moodle/...)

Folder Duplication in URL path (/moodle/moodle/...)

by Raul Duarte -
Number of replies: 3

Dear community,

We are running Moodle at micro-service architecture (Docker), in such a way that we have application in one container and database in another. They communicate with each other, and we can navigate normally through the application, without any kind of trouble. However, when we try to modify Moodle resources, like creating a course, new user, editing its content and so on, it is duplicating the folder "/moodle/" in the URL path, which is causing 404 Error (Not Found).

For instance, if we try to create a new user, the application tries to find "/moodle/moodle/login/signup.php". See that it is duplicating folder moodle in this path. How can I workaround this problem?


Average of ratings: -
In reply to Raul Duarte

Re: Folder Duplication in URL path (/moodle/moodle/...)

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

What have you got in your config.php file as the wwwroot?

In reply to Conn Warwicker

Re: Folder Duplication in URL path (/moodle/moodle/...)

by Raul Duarte -

Hey Conn,

We have defined wwwroot in config.php as "/var/www/html/moodle".

In reply to Raul Duarte

Re: Folder Duplication in URL path (/moodle/moodle/...)

by Tom Smith -

Did you ever figure this out? I had the exact same issue setting up a moodle on a linux server. I figured out a dirty fix... I have been testing it and have not found any problems, but I am maintaining a small training site for the small business I work for so I may never encounter a potential problem and would not recommend this fix on a production instance of moodle without extensive testing.


My fix was creating a symbolic link at /var/www/html/moodle/moodle and pointing it to /var/www/html/moodle

So anytime a redirect requests https://examplemoodle.com/moodle/moodle it routes it correctly to https://examplemoodle.com/moodle


ln -s /var/www/html/moodle /var/www/html/moodle/moodle