Nginx already enable with gzip.
How to optimize depend on your situations (server resources, websites, visitors).
Server for this forum using hiawatha-proxy (aka hiawatha+apache), php-fpm_event, enable php apc, install mod-pagespeed for apache, enable cache for software of this forum (aka SMF).
Remember, about combination not fastest but optimize for share-hosting.