IPFS只能http传输,要有https则必须要有Nginx做反向代理,这两者组合才刚刚好!
- 设置IPFS对外接口
//设置接口
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8085 //访问接口
ipfs config Addresses.API /ip4/127.0.0.1/tcp/9005 //上传接口
- 设置Nginx反向代理
server {
server_name example.com;
location / {
proxy_pass http://127.0.0.1:8085;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
listen 8084 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/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 {
listen [::]:9004 ssl ipv6only=on; # managed by Certbot
listen 9004 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/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_name example.com;
location / {
proxy_pass http://127.0.0.1:9005;
}
}
两者合壁,效果斐然!大家也可以看到SteemJiang在图片上传中使用了IPFS,并且是https的!好好设置下,问题解决得都会很顺利!
@tipu curate
Posted using Partiko Android
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Upvoted 👌 (Mana: 5/10 - need recharge?)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @lemooljiang! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
To support your work, I also upvoted your post!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
好厲害
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit