|
1 | | -# Apache Traffic Server |
| 1 | +# Traffic Server |
2 | 2 |
|
3 | | -## Notes |
| 3 | +1. 修改records.yaml以及remap.config |
| 4 | + remap.config示例:将所有发到该容器的请求反向代理到wordpress容器的80端口 |
| 5 | + ``` |
| 6 | + map / http://wdpress_nmxmp/ |
| 7 | + ``` |
| 8 | +2. 重建应用 |
4 | 9 |
|
5 | | -- Default HTTP port: 8080 |
6 | | -- Default HTTPS port: 8443 |
7 | | -- Management interface: 8088 |
8 | | -- Configuration files are mounted from `./src/` directory |
9 | | -- Cache storage is persistent across container restarts |
10 | | - |
11 | | -## Configuration Notes |
12 | | - |
13 | | -1. **Reverse Proxy Setup**: Edit `src/remap.config` to configure backend server mappings |
14 | | -2. **Performance Tuning**: Modify `src/records.config` for cache size and connection limits |
15 | | -3. **SSL Configuration**: Place SSL certificates in the appropriate volume mount if needed |
16 | | - |
17 | | -## Troubleshooting |
18 | | - |
19 | | -### Common Issues |
20 | | - |
21 | | -1. **"Not Found on Accelerator" Error**: |
22 | | - - Check that remap.config has correct mapping rules |
23 | | - - Ensure the client URL matches the mapping pattern |
24 | | - - Verify that the origin server in remap.config is accessible |
25 | | - |
26 | | -2. **Container fails to start**: Check port conflicts (8080, 8443, 8088) |
27 | | -3. **Configuration errors**: Validate syntax in `records.config`, `records.yaml` and `remap.config` |
28 | | -4. **Permission issues**: Ensure proper file permissions for mounted configuration files |
29 | | - |
30 | | -### Logs |
31 | | - |
32 | | -- Access logs: `/var/log/trafficserver/access.log` |
33 | | -- Error logs: `/var/log/trafficserver/error.log` |
34 | | -- Manager logs: `/var/log/trafficserver/manager.log` |
35 | | - |
36 | | -## FAQ |
37 | | - |
38 | | -### Q: How to configure TrafficServer as a reverse proxy? |
39 | | -A: Edit the `src/remap.config` file and add mapping rules like: |
40 | | -``` |
41 | | -map http://your-domain.com/ http://backend-server:port/ |
42 | | -``` |
43 | | - |
44 | | -### Q: How to increase cache size? |
45 | | -A: Modify the following lines in `src/records.config`: |
46 | | -``` |
47 | | -CONFIG proxy.config.cache.ram_cache.size INT 268435456 # RAM cache in bytes |
48 | | -CONFIG proxy.config.cache.disk_space INT 10737418240 # Disk cache in bytes |
49 | | -``` |
50 | | - |
51 | | -### Q: How to enable HTTPS? |
52 | | -A: Configure SSL certificates and update the SSL settings in `records.config` |
53 | | - |
54 | | -### Q: How to monitor TrafficServer? |
55 | | -A: Use the management interface at `http://your-server:8088/` or check the log files |
| 10 | +配置文档:https://docs.trafficserver.apache.org/getting-started/index.en.html#configuration |
0 commit comments