To test $_SERVER variable, you need to write a small php file that you will store on the web root of your server.
For instance you can store it as test.php directly at the root of web root.
Content of file should be :
<?php var_dump($_SERVER);?>
That's all.
There call it from browser as http://yourserver/test.php
Content of $_SERVER will be displayed.
REMOVE THIS FILE AFTER TEST, AS IT MAY BE A SECURITY LEAK THAT WILL GIVE INFORMATION TO POTENTIAL HACKER.
To configure hotname :
To display current value : hostname
To change it temporarily : hostname NEWNAME
To change it permanently : edit /etc/hostname and reboot
To change Global Parameter :
In ProjeQtOr, go to menu Parameters >> Global Parameters