Hi all,
I’m not very experienced, so would really appreciate your advice on my nginx setup. Is it safe, or do you think it will lead to performance issues/errors?
I tried to use the default nginx config included in the docker volume
(docker-compose.yaml version: 3.3). I think this didn’t work because:
- I am running several applications and subdomains on the same VPS
- Using a nginx reverse proxy config
- The only way I could get SSL working is by putting the cert in the http block in nginx.conf, with server blocks inside it
I tried adding in what was in the default peertube nginx file line-by-line. But the below is the only thing that works for me:
server {
listen 443 ssl;
server_name subdomain.example.org;
access_log /var/log/nginx/peertube.access.log; # reduce I/0 with buffer=10m flush=5m
error_log /var/log/nginx/peertube.error.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://127.0.0.1:9000;
}
client_max_body_size 2G;
}
# additional settings below this, in the http block:
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
gzip on;
```