mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 17:15:31 +00:00
Updated Nginx (markdown)
parent
1953166888
commit
bdd5c5ba38
1 changed files with 39 additions and 1 deletions
40
Nginx.md
40
Nginx.md
|
|
@ -1,3 +1,5 @@
|
|||
## Simple
|
||||
|
||||
``` default
|
||||
server {
|
||||
listen 80;
|
||||
|
|
@ -9,4 +11,40 @@ server {
|
|||
}
|
||||
}
|
||||
```
|
||||
* [read more](https://rocket.rs/guide/v0.5/deploying/#deploying)
|
||||
* [read more](https://rocket.rs/guide/v0.5/deploying/#deploying)
|
||||
|
||||
## Extended
|
||||
|
||||
This is working configuration for the [tracker.ygg](http://tracker.ygg) instance,
|
||||
includes cache settings:
|
||||
|
||||
``` default
|
||||
server {
|
||||
listen [302:68d0:f0d5:b88d::fdb]:80;
|
||||
server_name 302:68d0:f0d5:b88d::fdb tracker.ygg;
|
||||
access_log /var/log/nginx/btracker.access.log;
|
||||
|
||||
location @proxy {
|
||||
expires 15m;
|
||||
add_header Cache-Control "public, max-age=900";
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|css|js|ico|svg|css) {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, max-age=2592000";
|
||||
try_files $uri @proxy;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri @proxy;
|
||||
}
|
||||
|
||||
# legacy
|
||||
location /rss.xml {
|
||||
try_files $uri @proxy;
|
||||
}
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue