2019-10-21 10:25:19 +02:00
|
|
|
server {
|
|
|
|
server_name ipfs.kretschmann.io; # managed by Certbot
|
|
|
|
root /var/www/html;
|
|
|
|
index index.html index.htm index.nginx-debian.html;
|
|
|
|
|
|
|
|
proxy_pass_header Server;
|
|
|
|
proxy_read_timeout 1800s;
|
|
|
|
|
|
|
|
location ~ "^/(ipfs|ipns)(/|\$)" {
|
|
|
|
proxy_pass http://localhost:8080;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Ipfs-Gateway-Prefix "";
|
|
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
}
|
|
|
|
|
2019-10-26 17:36:43 +02:00
|
|
|
location ~ "^/api/v0/(add|version|id|ls)" {
|
2019-10-21 10:25:19 +02:00
|
|
|
proxy_pass http://localhost:5001;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
2021-09-12 17:11:25 +02:00
|
|
|
proxy_set_header host ipfs.vercel.app;
|
2019-10-21 10:25:19 +02:00
|
|
|
proxy_ssl_server_name on;
|
|
|
|
proxy_pass https://alias.zeit.co;
|
|
|
|
}
|
|
|
|
|
|
|
|
listen [::]:443 ssl ipv6only=on; # managed by Certbot
|
|
|
|
listen 443 ssl; # managed by Certbot
|
|
|
|
ssl_certificate /etc/letsencrypt/live/ipfs.kretschmann.io/fullchain.pem; # managed by Certbot
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/ipfs.kretschmann.io/privkey.pem; # managed by Certbot
|
|
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
if ($host = ipfs.kretschmann.io) {
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
} # managed by Certbot
|
|
|
|
|
|
|
|
listen 80 ;
|
|
|
|
listen [::]:80 ;
|
|
|
|
server_name ipfs.kretschmann.io;
|
|
|
|
return 404; # managed by Certbot
|
|
|
|
}
|