Problem Description
I have a Moodle application version 4.0.2 over Apache webserver, using PHP v8.0. After a login as administrator or submitting a change into administration panel, the application will redirects you on a really weird URI like "example.com/admin/\<a>\</a>".
I searched a lot in order to fix this behaviour, someone said it's a permission problem, so I changed the entire data directory and application directory to "0777" as reported into the official documentation. Someone else said it's an Apache misconfiguration. That's it:
<VirtualHost 0.0.0.0:80>
ServerName example.com
Redirect / https://example.com
</VirtualHost>
<VirtualHost 0.0.0.0:443>
ServerName example.com
DocumentRoot /var/www/example.com/httpdocs
ErrorLog ${APACHE_LOG_DIR}/error.log
AcceptPathInfo On
SSLEngine on
SSLCertificateFile /etc/apache2/certificates/certificate
SSLCertificateKeyFile /etc/apache2/certificates/certificate
<Directory /var/www/example.com/httpdocs/>
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Taking a deep look on what the application does, it seems like to return a 303 after a login/submit that brings you on the page https://example.com/admin/\<a>\</a>.
This stuff is driving me crazy, because I do not have any error or info log, neither an useful output from Apache itself.
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?