Dla poszukujących rozwiązania problemu wyświetlania komunikatu "Foreign Host or redirection!" na zapleczu podaję rozwiązanie:
Problem związany jest z certyfikatem SSL dla subdomen - skrypt sprawdzający host nie uwzględnia połączenia poprzez SSL i "odpytuje" przez http zamiast https.
Rozwiązaniem jest modyfikacja pliku:
ROOT/administrator/components/com_virtualdomains/assets/js/hostcheck.js
Kod:
jQuery.noConflict();
(function($) {
jQuery(document).ready(function() {
console.log('fertig');
$('.hostcheck').each(function() {
var curelem = $(this);
var host = $(curelem).attr('data-host');
var url = 'http://' + host + '/index.php?option=com_virtualdomains';
$.getJSON( url).done(function( response ) {
var data = jQuery.parseJSON(response);
if(host == data.hostname) {
$(curelem).html('OK')
$(curelem).css('color','green');
} else {
$(curelem).html('Redirection won\'t work!!');
$(curelem).css('color','red');
}
console.log(host + ' = ' + data.hostname);
}).fail(function() {
$(curelem).html('Foreign Host or redirection!');
$(curelem).css('color','red');
});
})
});
})(jQuery);
Zmieniamy na:
Kod:
jQuery.noConflict();
(function($) {
jQuery(document).ready(function() {
console.log('fertig');
var oLoc = document.location,
prot = oLoc.protocol;
$('.hostcheck').each(function() {
var curelem = $(this);
var host = $(curelem).attr('data-host');
var url = prot + '//' + host + '/index.php?option=com_virtualdomains';
$.getJSON( url).done(function( response ) {
var data = jQuery.parseJSON(response);
if(host == data.hostname) {
$(curelem).html('OK')
$(curelem).css('color','green');
} else {
$(curelem).html('Redirection won\'t work!!');
$(curelem).css('color','red');
}
console.log(host + ' = ' + data.hostname);
}).fail(function() {
$(curelem).html('Foreign Host or redirection!');
$(curelem).css('color','red');
});
})
});
})(jQuery);
Credits: Martina Major
https://major-online.de/foreign-host-or-redirection