top | item 13022041

(no title)

nodejs-news | 9 years ago

I'm a great self-hosting fan, behind my DSL connection using 2 x RaspberryPI. I have 3 static web sites, 2 with Jekyll, 1 with Hugo, with great perf :

checkout webpagetest -> https://www.webpagetest.org/result/161123_0R_8RDY/

and feel free to check my 3 web sites:

- http://www.it-wars.com - http://www.louer-hendaye.com - http://www.nodejs-news.com

Init : 2 RaspberryPi + electric plugs : 2x 30$ + 2 x6$ Monthly bill: electricity : about nothing DSL : 30$

Enjoy!

discuss

order

larrydag|9 years ago

Can you explain your setup and how you did your self hosted sites?

rainboiboi|9 years ago

Simply install any linux distro of your choice (mine is Ubuntu) and fire up apache/nginx to load in your HTML. Then port-forward 80 to your raspberry pi IP address and you are done. If you are on dynamic IP (which most of the residential broadband does), set up dynamic DNS and add a CNAME record in your DNS to point your custom domain to your dynamic domain - this way visitors will be able to access your site even after your IP changes.

nodejs-news|9 years ago

I have 2 raspi one with haproxy, one with nginx with 3 vhost. Haproxy was because I've planned to have several raspi to loadbalance traffic across. My DSL line give me 1Mb/sec. When writing a new post a send 10x time to optimize pictures to be able to serve more people. each day I've about 150vu on each web site. One take away: after Jekyll or Hugo finished static page generation I've a bash script to gzip every file to avoid raspbi to make it at the fly, and nginx setup for that is : gzip_static on;

On my DSL router I forward all port:80/tcp traffic to my haproxy raspi.

atmosx|9 years ago

You have a static IP?

themodelplumber|9 years ago

You can use a client to update the record of your dynamic IP. I don't know if that's what he's doing, but it's in all the Pi web hosting tutorials.

nodejs-news|9 years ago

Yes a have a static ip, but DynDns like service providers works too. I use then for years, before my DSL provider gave me one :)