I'm starting to figure these all out.
I think there are problems with these files: function.cms_stylesheet.php and function.metadata.php. They are probably conflict with Nginx configuration.
Does it has something to do with these:
======
if ($showbase)
{
$base = $config['root_url'];
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off')
{
$base = $config['ssl_url'];
}
$result .= "\n<base href=\"".$base."/\" />\n";
}
======
if( $auto_https ) {
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') {
$use_https = 1;
}
}
======
Why the script thinks Nginx configuration ($_SERVER['HTTPS) is on?
This is my big curiosity.