you needn't build ZendGuardLoader.so yourself, just download the binary from their website. then in php.ini add a line like
zend_extension=/usr/local/Zend/lib/Guard-7.0.0/php-5.5.x/ZendGuardLoader.so
this is no difference between web servers, just an php issue, regardless apache, nginx or...