Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: How to get the hostname by perl?

$
0
0
I know this is a year old thread but just to help someone in the future as it is not documented clearly:

There is a $r->variable(name) function

So just do this

$r->variable(host)

Basically any variable you'd use in your nginx conf/inc files is available to perl in that way.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>