Welcome! Log In Create A New Profile

Advanced

location ~* \.(...) access_log off; prevents access to files instead of logs

Roberto D. Maggi
November 14, 2023 08:52AM
Hi you all,
I'm having a problem with these two stanzas, in writing down a virtual
host and can't figure out what's wrong with them.
They look correct but the first doesn't simply work and the second blocks

--> here I'm trying to add this header only to cgi|shtml|phtml|php
extensions

location ~* \.(?:cgi|shtml|phtml|php)$ {
      add_header Cache-Control "public";
      client_max_body_size 0;
      chunked_transfer_encoding on;
      }

--> here I don't want to log accesses to to
woff|woff2|ico|pdf|flv|jpg|jpeg|png|gif|js|css|gz|swf|txt files
location ~*
\.(?:woff|woff2|ico|pdf|flv|jpg|jpeg|png|gif|js|css|gz|swf|txt)$ {
      access_log off;
      }


Does anybody can guess what's wrong with them?
Thanks in advance.

Rob
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

location ~* \.(...) access_log off; prevents access to files instead of logs

Roberto D. Maggi November 14, 2023 08:52AM

Re: location ~* \.(...) access_log off; prevents access to files instead of logs

Maxim Dounin November 14, 2023 10:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready