Browsing Taglogs

Little trick to get AWS instance_id as variable in Nginx

If you are running in AWS environment it might be useful to get Amazon instance_id in Nginx for different purposes (logging, headers etc).

To do that we need to compile Nginx with Perl support (–with-http_perl_module flag during compilation). After that is done we can put this snippet inside of our httpd Nginx config section:

Important: While the Perl module is performing a long-running operation,  …

Continue reading  »