Skip to content

Instantly share code, notes, and snippets.

@gaspanik
Created March 7, 2014 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaspanik/9410220 to your computer and use it in GitHub Desktop.
Save gaspanik/9410220 to your computer and use it in GitHub Desktop.
digitalocean_multiple_ghost_nginx_cachecontrol.conf
server {
listen 80;
# set your hostname
server_name your_hostname;
client_max_body_size 10M;
location ~ ^/assets/(img|js|css|fonts)/ {
# set your path
root your_theme_path;
add_header Cache-Control "public, max-age=31536000";
}
location ~ ^/(content/images/) {
# set your path
root your_ghost_install_path;
add_header Cache-Control "public, max-age=31536000";
}
location / {
# set your port number
proxy_pass http://localhost:your_port_number/;
proxy_set_header Host $host;
proxy_buffering off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment