Topic on Project:Support desk

404 error on rest.php on Mediawiki 1.35.1

3
PedroBraga1917 (talkcontribs)

Greetings,


In a server on my workplace, we've installed Mediawiki 1.35 running on a NGinx / Ubuntu Server 20.04 LTS setup.

We attempted to set up VisualEditor during the install process, but it simply do not open when we click on "edit" (nothing happens, it does not crash also).

As a placeholder, we are using TinyMCE but visual editor is a lot better and we need to set it up.


During our investigations on the cause of the problem, we've noticed that when Parsoid calls the rest.php located on the root folder of the installation, it returns a 404 error. We already checked the Nginx config file and the rest.php location is set there, so this should not happen.


Any help from this forum will be really helpful for us, we are kinda of chasing our own tails.

This post was hidden by Ciencia Al Poder (history)
Ciencia Al Poder (talkcontribs)

Be sure rest.php and anything after it is routed through PHP (the last line ensures the script executed is rest.php and not a random file inside a rest.php folder, since URLs often use rest.php/some/oter/path)

        location /rest.php {
                fastcgi_pass unix:/run/php/php-fpm.sock;
                include /etc/nginx/fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
        }
Reply to "404 error on rest.php on Mediawiki 1.35.1"