How it can be used to serve content via internet?

From @slrslr on Wed May 18 2016 09:30:09 GMT+0000 (UTC)

Hello,

would it be good to mention examples on how the IPFS can be used to distribute content/files over internet/not only via its own network?
Im mainly interested on how IPFS can be beneficial while hosting public webpage on the internet.
But so far cant read any examples on the project webpage and Google find nothing.

Copied from original issue: https://github.com/ipfs/support/issues/28

1 Like

From @graffen on Wed Nov 16 2016 10:20:35 GMT+0000 (UTC)

I’ve put my static web site files in IPFS, registered an IPNS entry and serve it through an nginx proxy on a VPS.

The relevant config from nginx is:

location / {
  rewrite /(.*) /ipns/graffen.dk/$1 break;
  proxy_pass http://127.0.0.1:8080;
}

Does this answer your question?

From @slrslr on Wed Nov 16 2016 12:24:20 GMT+0000 (UTC)

Thank you, this is what i have been looking for. Also here i found more details on how to use-ipfs-to-host-your-webpage-using-a-standard-domain and there another tutorial http://www.atnnn.com/p/ipfs-hosting/

Will be there possibility to go round the issue where domain name is the only single point of failure in this system (distributed IPFS —> cloud hosting server with high availability —> domain.tld)?

And i assume there is no way regular internet users without IPFS installed can access ipfs pages just via web browser (thanks to for example volunteers who make it somehow accessible)? It is like torrent, but one need torrent client, unless IPFS can be enabled similar way like torrent using WebRTC and webtorrent which “enables torrent” even on computers that do not have classic torrent client installed. Maybe if in future, Firefox is made with ipfs://?
https://github.com/nebulis-io/directory

From @hsanjuan on Wed Nov 16 2016 13:19:25 GMT+0000 (UTC)

Hi, you might be find more details about setting up a website at https://github.com/ipfs/examples/tree/master/examples/websites (this being the official resource on that topic)

About your second comment, the goal is to make the internet better by upgrading the hypermedia distribution system. Not by creating a stack on the side, but by making something that integrates seamlessly (probably unnoticed by the final the user) with the current stack. On this line, work is being done on https://github.com/libp2p/js-libp2p-webrtc-star which will enable the JS implementation of IPFS to use WebRTC for communication and run on the browser. And yes, at some point in the future we would expect browsers to understand ipfs:// (or fs://ipfs/...) and become a node to the ipfs network themselves.