If you do not want to create a PHP module for Node.JS, I think that the CLI is your only choice - you can pass the necessary variables through the command line, and I think that says nothing about rebuilding them inside the script
php -f myscript.php /websites/myscript domain.com 1.2.3.4.5
Now, the ideal way would be to take these arguments and write them into variables that you then use in your script.
script, $_SERVER , , . (Inelegant, $_SERVER, $_GET ..)
$_SERVER["REQUEST_URI"] = $argv[1];
$_SERVER["SERVER_NAME"] = $argv[2];
$_SERVER["REMOTE_ADDR"] = $argv[3];
CLI:
( , , , . PHP , ... edit: , , , )