Solved: moodle 3.9 slash arguments

zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

Hello,
how do I activate the slash arguments function? i have the basic installation of myvesta and i am installing moodle 3.9, i have php 7.3 mfp with apache as web server and nginx as proxy.
Can you help me? i am trying to follow this guide https://docs.moodle.org/37/en/Apache#Slasharguments but i cannot.

thank's
Last edited by zenobie on Tue Jul 28, 2020 11:30 am, edited 1 time in total.
User avatar
myVesta
Site Admin
Posts: 932
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

did you tried to add AcceptPathInfo On in /etc/apache2/apache2.conf and then to restart Apache?
zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

yes I tried, it is as if that file is not used or overwritten by another locally. The second doubt is that it must modify nginx to enable it but nginx is as a proxy and I believe it is apache the interpreter of this.
zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

one of the many errors that I detect from the log is public_html/theme/font.php/boost/core/1595873077/fontawesome-webfont.woff
If I understand correctly, the dynamics of the passage of the variables change, a sort of advanced get
User avatar
myVesta
Site Admin
Posts: 932
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

WEB -> Edit (domain) -> Turn OFF proxy support
Maybe that help?
zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

I also tried to put the command in the .htaccess file created in public_html and in the local / home / user / conf / web files both in the ssl file and in the normal file as suggested by this solution https://serverfault.com/questions/58366 ... -in-apache.
I have also tried to disable nginx but I lose access to the site.
I also restored the clean debian and reinstalled everything, to avoid having to modify some files making mistakes
User avatar
myVesta
Site Admin
Posts: 932
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Did you tried to disable proxy support as I described in previous post?
zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

Yes when the Nginx is disabled I lose access to the site, because hsts is enabled
zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

I disabled Nginx and ssl, modified moodle's config.php and logged me in, so the problem is with nginx.
I try to follow this https://docs.moodle.org/37/en/Nginx#Slasharguments and see if I can solve it by leaving nginx enabled
User avatar
myVesta
Site Admin
Posts: 932
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Aha!
Then we need to make separate nginx template.
You can grab
/usr/local/vesta/data/templates/web/nginx/hosting.tpl
/usr/local/vesta/data/templates/web/nginx/hosting.stpl
copy it to
/usr/local/vesta/data/templates/web/nginx/hosting-moodle.tpl
/usr/local/vesta/data/templates/web/nginx/hosting-moodle.stpl

edit those files and adapt it to https://docs.moodle.org/37/en/Nginx#Nginx

probably hard to figure out what you should change there... maybe I get some time to see what's going there...

on first look...
find

Code: Select all

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }
and BEFORE it add:

Code: Select all

        location ~ [^/]\.php(/|$) {
         proxy_pass      http://%ip%:%web_port%;
       }
also, before 'location' blocks try to add

Code: Select all

    rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
Do it in both .tpl and .stpl fle.

Then try to set "hosting-moodle" proxy template to your domain (WEB -> Edit)
Post Reply