Answer the question
In order to leave comments, you need to log in
How to write logs of visits to the site?
There is an html page that is embedded on other sites through an iframe. It is necessary to collect information about which sites this page was requested from. How can this be done without a server-side API?
Answer the question
In order to leave comments, you need to log in
If you need simple statistics, then the usual access log is also suitable:
server {
listen 80;
server_name example.com;
# Logs
access_log /var/log/nginx/access.log;
}
awk -F\" '{print $2}' access.log | awk '{print $2}' | sort | uniq -c | sort -r
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question