Solved: moodle 3.9 slash arguments

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

unfortunately it doesn't work, my doubt is that selected a new template I have to start recompiling the configuration files, because I had the same problem with php and I modified the files here /etc/php/7.3/fpm/pool.d
zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

It works! I ran both the gui and vesta / bin commands for rebuild and it worked, the only problem I have now is enabling let's encrypt it returns error 429 that I have seen being linked to too many requests, I will try again later.
Mark as solved the topic that seeing on the net will be of great help to other beginners like me.
Thanks so much
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Can you paste here your template files, so we have it for other users?

BTW, until letsenrypt unban your server, you can temporary install unsigned SSL using the command v-install-unsigned-ssl
zenobie
Posts: 12
Joined: Mon Jul 27, 2020 8:06 pm

oh yes!!
this is hosting-moodle.tpl

Code: Select all

server {
    listen      %ip%:%proxy_port%;
    server_name %domain_idn% %alias_idn%;
    error_log  /var/log/%web_system%/domains/%domain%.error.log error;
    rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;

    location / {
        proxy_pass      http://%ip%:%web_port%;
        location ~* ^.+\.(%proxy_extentions%)$ {
            root           %docroot%;
            access_log     /var/log/%web_system%/domains/%domain%.log combined;
            access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
            expires        max;
            # try_files      $uri @fallback;
        }
    }

    location ~ [^/]\.php(/|$) {
         proxy_pass      http://%ip%:%web_port%;
    }

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location @fallback {
        proxy_pass      http://%ip%:%web_port%;
    }

    location ~ /\.ht    {return 404;}
    location ~ /\.svn/  {return 404;}
    location ~ /\.git/  {return 404;}
    location ~ /\.hg/   {return 404;}
    location ~ /\.bzr/  {return 404;}

    disable_symlinks if_not_owner from=%docroot%;

    include %home%/%user%/conf/web/nginx.%domain%.conf*;
}
and this is hosting-moodle.stpl

Code: Select all

server {
    listen      %ip%:%proxy_ssl_port% ssl http2;
    server_name %domain_idn% %alias_idn%;
    # ssl         on;
    ssl_certificate      %ssl_pem%;
    ssl_certificate_key  %ssl_key%;
    error_log  /var/log/%web_system%/domains/%domain%.error.log error;
    rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;

    location / {
        proxy_pass      https://%ip%:%web_ssl_port%;
        location ~* ^.+\.(%proxy_extentions%)$ {
            root           %sdocroot%;
            access_log     /var/log/%web_system%/domains/%domain%.log combined;
            access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
            expires        max;
            # try_files      $uri @fallback;
        }
    }

    location ~ [^/]\.php(/|$) {
         proxy_pass      http://%ip%:%web_port%;
    }

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location @fallback {
        proxy_pass      https://%ip%:%web_ssl_port%;
    }

    location ~ /\.ht    {return 404;}
    location ~ /\.svn/  {return 404;}
    location ~ /\.git/  {return 404;}
    location ~ /\.hg/   {return 404;}
    location ~ /\.bzr/  {return 404;}

    disable_symlinks if_not_owner from=%docroot%;

    include %home%/%user%/conf/web/snginx.%domain%.conf*;
}
My configuration is Debian 10 on vps and myVesta 0.9.8-26-30 with enabled apache2 as web server and Nginx as proxy server.
Thank's for this fantastic panel!
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Cool, I guessed correct what is needed to add :D
Post Reply