It is running perfectly but I would like to ask this
When I run www.domain.com/phpinfo.php [phpinfo() command] I get the following:
_SERVER["SERVER_ADDR"] = 192.168.0.5

It is correct because it is the local ip of the server but
Is there any chance to emulate in apache the public ip like
_SERVER["SERVER_ADDR"] = xxx.xxx.xxx.xxx [public server] ???
I am only testing this and my router is a Webstar with a home internet connection, but if it would possible to emulate the server address to a public ip it would be interesting.

The $_SERVER["SERVER_ADDR"] always contains IP of the networkcard you should use $_SERVER["HTTP_HOST"] which contains the requested host. So if you call it from outside there is your domain name (if you have one over DNS). From inside there can be the name of the PC or the internal IP.