mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-14 00:49:19 +02:00
Updated FAQ Frequently Asked Questions (markdown)
@@ -43,18 +43,22 @@ Put in following lines:
|
|||||||
|
|
||||||
```
|
```
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Zoraxy Service
|
Description=Zoraxy Reverse Proxy Server
|
||||||
After=network.target
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
||||||
|
# root is needed here, since Zoraxy uses ports < 1000 and doing network stuff
|
||||||
|
|
||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
|
|
||||||
WorkingDirectory=/opt/zoraxy/src
|
# Change the paths according to your needs!
|
||||||
ExecStart=/opt/zoraxy/src/zoraxy -port=:8000
|
|
||||||
Restart=always
|
WorkingDirectory=/directory/containing/zoraxy
|
||||||
|
ExecStart=/path/to/zoraxy_linux_amd64 -port=:8400 -fastgeoip=true
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -68,3 +72,39 @@ Now status messages can be showed with:
|
|||||||
`sudo systemctl status zoraxy`
|
`sudo systemctl status zoraxy`
|
||||||
|
|
||||||
Source: [https://github.com/tobychui/zoraxy/issues/8](https://github.com/tobychui/zoraxy/issues/8)
|
Source: [https://github.com/tobychui/zoraxy/issues/8](https://github.com/tobychui/zoraxy/issues/8)
|
||||||
|
|
||||||
|
# Logrotation
|
||||||
|
Zoraxy logs can become big, depending on the usage and traffic.
|
||||||
|
|
||||||
|
Let´s create a logrotation rule for it!
|
||||||
|
|
||||||
|
`sudo nano /etc/logrotate.d/zoraxy`
|
||||||
|
|
||||||
|
Change the path to the directory containing Zoraxy logs (full path)
|
||||||
|
|
||||||
|
```plain
|
||||||
|
/path/to/the/zoraxy/log/*.log {
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
rotate 7
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
notifempty
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
"daily" means daily execution
|
||||||
|
|
||||||
|
"missingok" ignore if no log files existing
|
||||||
|
|
||||||
|
"rotate 7" keep old log files for 7 days
|
||||||
|
|
||||||
|
"compress" compress log files (log.gz)
|
||||||
|
|
||||||
|
"delaycompress" waits a little bit before compressing the first file to avoid data loss
|
||||||
|
|
||||||
|
"notifempty" ignores empty files
|
||||||
|
|
||||||
|
Run and test with:
|
||||||
|
|
||||||
|
`sudo logrotate -d /etc/logrotate.d/zoraxy`
|
Reference in New Issue
Block a user