I am using MW 1.25.1, and our server is available at a URL like https://mywikidnsalias.mydomain.com. I cannot enable async run jobs because the async request is sent to a URL different than the value in $wgServerName.
Our server uses an httpd VirtualServer using DNS aliases to differentiate different applications on the server, and the entire server runs under https. Looking at the httpd logs, I see POST requests to http://myservername.mydomain.com/Special:JobQueue instead of https://mywikidnsalias.mydomain.com/Special:JobQueue.
Looking at includes/MediaWiki.php for RunJobs (about line 642), I see that there is a call to fsockopen() with the name of the host. There are a couple of problems here.
- $info['host'] is the name of the host, not the name of the wiki from $wgServer. On servers that use virtual hosting, the hostname and $wgServer may be different, so fsockopen() may result in a request that routes to the wrong virtual server.
- The call to fsockopen() does not account for $info['scheme'], which may be https.
I believe the solution is to rework the call the fsockopen() to either use a different method (i.e. not fsockopen()), or at least to use the info from $wgServer more correctly.