# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# sets the proxy cache path location, max size 2g | |
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g; | |
# transfers the `Host` header to the backend | |
proxy_set_header Host $host; | |
# uses the defined STATIC cache zone | |
proxy_cache STATIC; | |
# cache 200 10 minutes, 404 1 minute, others status codes not cached |
Full blog post can be found here: http://pnommensen.com/2014/09/07/high-performance-ghost-configuration-with-nginx/
Ghost is an open source platform for blogging founded by John O'Nolan and Hannah Wolfe. It's a node.js application and therefore works great in conjunction with nginx. This guide will will help you create a high performance nginx virtual host configuration for Ghost.
"Don't use #nodejs for static content" - @trevnorris. If #nginx isn't sitting in front of your node server, you're probably doing it wrong.
— Bryan Hughes (@nebrius) August 30, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
The node.js application runs on a port on your server
The boring parts of standing up a twitter bot I always forget. This guide should get you from "I got absolutely nothing" to "I posted a thing to twitter with Python!"
Here's the deal. If you make a bunch of bot accounts, and all those accounts are tied to one cell phone number, you are in for a round of API access recovation musical chairs.
To get around this, you need to create your own central twitter app. This app will in turn then be used by all your bot accounts. This app will be tied to your main account, backed by your phone number.
// insert your Spotify client id and secret here | |
const clientId = "xxx" | |
const clientSecret = "xxx" | |
// the Spotify country ISO code | |
const spotifyCountry = "DE" | |
let widget = await createWidget() | |
Script.setWidget(widget) | |
Script.complete() |