User documentation
- What is redirection.io?
- Starter's guide
- What are organizations and projects?
- Invite new collaborators
- User account and preferences
- Using traffic logs
- Create a rule
- Triggers and markers reference
- Actions reference
- How to bulk-import or export redirection rules?
- Managing instances
- Project notifications
- Project segmentation
- How much does it cost?
- Can I use redirection.io for free?
- About us
Developer documentation
Agent documentation
- Installing the agent
- Upgrading the agent
- Agent command line options
- The agent as a reverse proxy
- Agent configuration reference
- Minimal configuration
- Listening for requests
- Forwarding requests to the backend
- Virtualhosts
- Trusted proxies
- GeoIP database
- Response compression
- Performance tweaks
- Access logs
- Persisting data in a s3 bucket
- Monitoring the agent
- Using the agent behind a HTTPS proxy
- Agent configuration examples
Managed instances
Crawler
Knowledge base
Legacy versions
The instructions below have been customized for your project "".
Customize these instructions for the project
Access logs
The redirection.io agent can be configured to log the incoming requests, which can be useful for monitoring the traffic on your website or for debugging purposes.
The access_log configuration key allows you to specify the type of the output (as a file, on the standard output or to a syslog server), the format of the access logs (json, text, rfc3164 or rfc5424) and the path to the access log file.
For example:
instance:
name: 'My Instance'
reverse_proxy:
listen:
- 'tcp://0.0.0.0:80'
forward:
address: 'backend:8080'
agent:
project_key: my-project-key
access_log:
output: file
format: json
path: /var/log/access.log.json
Access logs are disabled by default. Also, access logs can be configured at the Virtualhost level, which allows you to have different access logs for different websites hosted on the same agent.
For example, the following configuration will enable a "file" access logs for the example.com virtualhost, and a "syslog" access logs for the media.example.com virtualhost:
instance:
name: 'My Instance'
reverse_proxy:
listen:
- 'tcp://0.0.0.0:80'
forward:
address: 'backend:8080'
agent:
project_key: my-project-key
virtual_hosts:
-
domains:
- example.com
- www.example.com
access_log:
output: file
format: text
path: /var/log/example.com-access.log
-
domains:
- media.example.com
forward:
directory: /var/www/media
access_log:
output: syslog
format: rfc5424
address: 'syslog-server:514'