Welcome! Log In Create A New Profile

Advanced

access_log variables

Posted by wizards 
access_log variables
December 23, 2011 06:23PM
I read in the wiki I can use variables in the access_log path.

But how do I go about extracting the variables from the requested url that I need?

This is what I need to do:

Requests to /images/site112/someimage.png

Should be written to access log /var/log/nginx/access-site112.log

Where as a request to /images/site177/someimage.png

..should be written to access log /var/log/nginx/access-site177.log

Is this even possible?

Best regards,

Khael
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready