Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count redirects and subdomain visits #19

Open
ubesluttsom opened this issue Aug 28, 2024 · 0 comments
Open

Count redirects and subdomain visits #19

ubesluttsom opened this issue Aug 28, 2024 · 0 comments

Comments

@ubesluttsom
Copy link

We could implement logging to capture and analyze requests made to specific subdomains on our website, such as cyb.no, bong.cyb.no, and oko.cyb.no. This will allow us to monitor which redirects and subdomains are actually in use (and remove those that are not).

We should count the number of requests made to each of these domains. For instance, using a grep command to filter the log file and wc -l to count the occurrences.

The logs need to be purged regularly.

We use Caddy as a web server. Something like this could work:

{
    # Global options
    log {
        output file /var/log/caddy/domain_specific.log
        format single_field "{host} {uri} {status}"
    }
}

bong.cyb.no, cyb.no, oko.cyb.no {
    # Specific configuration
    log {
        output file /var/log/caddy/domain_specific.log
        format "{host} {uri} {status}"
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant