I\'m experiencing a problem regarding Moodle.
I\'ve made an install into a Linux server, but CSS and themes are not displaying so i have only plain text.
Ho
I upgraded server OS from Debian 8 to Debian 9 Stretch, and CSS stopped to work in Moodle after this.
I used ProxyPassMatch in Apache config to use PHP 7.0 for Moodle v3.x and PHP 5.6 for the rest of the sites:
ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php/php7.0-fpm.sock|fcgi://localhost/var/www/"
One possible reason why this happens. As it is decribed on: https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html#env
The reason, why the ProxyPassMatch does not set the PATH_INFO is the following:
Environment Variables
In addition to the configuration directives that control the behaviour of mod_proxy, there are a number of environment variables that control the FCGI protocol provider:
proxy-fcgi-pathinfo: When configured via ProxyPass or ProxyPassMatch, mod_proxy_fcgi will not set the PATH_INFO environment variable. This allows the backend FCGI server to correctly determine SCRIPT_NAME and Script-URI and be compliant with RFC 3875 section 3.3. If instead you need mod_proxy_fcgi to generate a "best guess" for PATH_INFO, set this env-var. This is a workaround for a bug in some FCGI implementations. This variable can be set to multiple values to tweak at how the best guess is chosen (In 2.4.11 and later only):
first-dot: PATH_INFO is split from the slash following the first "." in the URL.
last-dot: PATH_INFO is split from the slash following the last "." in the URL.
full: PATH_INFO is calculated by an attempt to map the URL to the local filesystem.
unescape: PATH_INFO is the path component of the URL, unescaped / decoded.
any other value: PATH_INFO is the same as the path component of the URL. Originally, this was the only proxy-fcgi-pathinfo option.
The solution is described here: https://serverfault.com/questions/888114/missing-path-info-on-apache-2-4-php5-6-fpm-proxy-fcgi/935406#935406
SetHandler should be set in Apache config like this to solve the PATH_INFO variable problem:
<FilesMatch "\.php$">
SetHandler "proxy:unix:/run/php/user.sock|fcgi://localhost"
</FilesMatch>
<Proxy "fcgi://localhost/" enablereuse=on max=10>
</Proxy>
Have you checked your web server to see if there are any error messages?
Next, have you tried looking in your web browser developer tools, to see if there are any errors there (especially 404 errors)?
Finally, make sure debugging is on for your Moodle site (right up to developer level) and see if that sheds some light on the problem.
You might also want to check that all of your Moodle data folder is writable, as otherwise Moodle may have trouble generating the cached theme files.
If you are using nginx make sure your config file in /etc/nginx/sites-enabled/[your site] is according to the directions from moodle. Copy this config https://docs.moodle.org/32/en/Nginx
you can disable slash argument in Sites Administration > Server > HTTP but no recommended. Activate your server slash argument. Docs here: https://docs.moodle.org/36/en/Using_slash_arguments