Below
statement is used to disable logging.
access_log
off;
Example
location =
/about{
access_log off;
return 200 "Hello Welcome to
NGINX";
}
nginx.conf
events {
}
http {
include mime.types;
server {
listen 9090;
server_name localhost;
location = /about{
access_log off;
return 200 "Hello Welcome to NGINX";
}
location = /not_found{
return 404 "File can't be found";
}
}
}
No comments:
Post a Comment