ℹ️ This page contains an example of a configuration file for the redirection.io agent. To discover all the configuration file and its options, please refer to the agent configuration reference. You may also check the list of configuration examples to find a configuration example that is close to your technical context.

Per Virtualhost access logs

This example showcases how to handle separate access logs configuration, Virtualhost per Virtualhost. In this example, there are two Virtualhosts:

  • one for example.com and www.example.com
  • one for media.example.com

The first Virtualhost will output accesslogs as a text file located at /var/log/example.com-access.log

The redirection.io itself does not rotate logs, so it is up to you to configure file-based logs rotation.

The second Virtualhost will also generate access logs, but to a syslog server accessible at the address syslog-server:514, using the format rfc5424.

If requests are received for another domain name, they will be normally processed and forwarded to the backend address (backend:8080) but no access log will be saved, as the access_log node has not be defined directly under reverse_proxy.