MediaWiki-Docker/Configuration recipes/Ngrok

From mediawiki.org
Jump to navigation Jump to search

Ngrok[edit]

You can use ngrok to share your local site with others. After installing ngrok, run ngrok http 8080. Whatever URL is shown to you needs to be set in your LocalSettings.php.

LocalSettings.php
if ( isset( $_SERVER['SERVER_NAME'] ) && strpos( $_SERVER['SERVER_NAME'], 'ngrok' ) > 0 ) {
	$wgServer = WebRequest::detectProtocol() . '://' . $_SERVER['SERVER_NAME'];
}