: Configure MediaWiki responses with and without domain part? We are running an internal MediaWiki server. The wiki server has a PKIX certificate with the following names (the certificate is well
We are running an internal MediaWiki server. The wiki server has a PKIX certificate with the following names (the certificate is well formed per RFC 5280 and CA/B Baseline Requirements):
IP Address
wiki
wiki.example.com
Additionally, the wiki server's LocalSettings.php has the following:
$wgServer = "//wiki.example.com"
The line above is protocol agnostic, and allows things to work as expected with both HTTP and HTTPS.
We visit the wiki server in one of three ways:
10.1.2.10/wiki https://wiki/wiki wiki.example.com/wiki
When we use 10.1.2.10/wiki or wiki/wiki, the CSS is not fetched by a browser because it violates the Same Origin Policy. 10.1.2.10 and wiki and wiki.example.com are different origins to a browser, so the CSS linked with wiki.example.com due to $wgServer are not fetched. An example of missing CSS is shown below:
Question: How do I configure the MediaWiki server such that an IP address can be used and the domain part is optional?
Examples: if the server receives a request for 10.1.2.10/wiki, then its responses should use 10.1.2.10 (and not wiki or wiki.example.com). If the server receives a request for wiki/wiki, then its responses should lack the example.com. And if the server receives a request for wiki.example.com/wiki, then its responses should include the example.com.
More posts by @Dunderdale272
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.