01225: HTTP_HOST may not always be the proper public URL (HTTP_X_FORWARDED_HOST)
Description: Sometimes the public facing web server forwards a request to another CGI process or another internal Web server. In this case, pmwiki will use the environment variable $_SERVER['HTTP_HOST'], which will reflect the internal process/server. Checking for the value HTTP_X_FORWARDED_HOST is a quick fix which will expand the install base for default setups without any extra configuration.
I tried setting
$ScriptUrl in local/config.php and this resulted in no change to the output file. Changing pmwiki.php was the only solution which would give me the proper URLs for css and image media.