Skip to content

Commit

Permalink
initial comment to add log_format
Browse files Browse the repository at this point in the history
Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed Jun 18, 2024
1 parent aacc07f commit 3eb8eba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Docker/nginx/template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ upstream frappe-bench-frappe {
upstream frappe-bench-socketio-server {
server socketio:80 fail_timeout=120;
}

log_format prod_log '{"Request":"$request","Status":"$status","Request_URI":"$request_uri","Host":"$host","Client_IP":"$remote_addr","Proxy_IP(s)":"$proxy_add_x_forwarded_for","Proxy_Hostname":"$proxy_host","Real_IP":"$http_x_real_ip","User_Client":"$http_user_agent","TimeTaken":"$request_time","ContentType":"$content_type"}';

server {

listen 80;
listen [::]:80;

access_log /var/log/nginx/access.log prod_log;

server_name {{ ' '.join(SITENAME.split(',')) }};
root /workspace/frappe-bench/sites;

Expand All @@ -23,6 +28,7 @@ server {
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "same-origin, strict-origin-when-cross-origin";

server_tokens off;

location /assets {
try_files $uri =404;
Expand Down

0 comments on commit 3eb8eba

Please sign in to comment.