I have a perplexing problem with CGI wrapper mode (Virtualmin 3.92.gpl running on Ubuntu 10.04 on a VPS). It worked fine previously on Ubuntu 8.04, but after hours of research I just can’t make it work since the OS upgrade. FastCGI works fine for a while but gradually exhausts all available memory (seems to be a known problem) and mod_php also works fine but causes file permission problems with some scripts (also a known problem).
The main symptom with CGI wrapper is that pages are displayed without any styling. Essentially the problem seems to be that scripts think they are running in /cgi-bin instead of /public_html. Generally I do NOT see warnings in any log files but when I do, they are looking for a non-existent file in /cgi-bin. In Drupal I can work around the problem to some extent by setting $base_url in settings.php. In Joomla I can fix it to some extent by setting $live_site in configuration.php. But I still have unresolved problems in Wordpress (permission denied in admin) and Magento, for example.
Virtualmin was installed using install.sh and seems to be configured correctly - for example, /etc/apache2/suexec/www-data has the expected contents. I’ve tried setting all site file permissions to 755 (or 777). I’ve tried setting and unsetting cgi.fix_pathinfo and cgi.force_redirect (and checked that they really do take effect, 'cos it’s easy to edit them in the wrong place or forget to apply the change). I’ve tried a “clean” installation of a virtual server. Nothing seems to make any difference.
I found many reports of similar problems but the threads all end with no resolution or a solution that doesn’t work for me. It should be easy to reproduce - clean install Virtualmin on Ubuntu Lucid, install Drupal or Joomla or Wordpress in CGI wrapper mode and you’ll immediately see problems.