Accessing WordPress installation in its own directory at domain root

I think you need to use:

define("ROOT", realpath(dir(__file__)) . "https://wordpress.stackexchange.com/");
require(ROOT . "apps/wordpress/htdocs/wp-blog-header.php");

Got this from the PHP.Net site however haven’t used the code (Or use this type of code often) so can’t guarantee it will work.

Cheers,
Joe