From a97a0a22f6c3ed64f412f07195a45f96b836ef90 Mon Sep 17 00:00:00 2001
From: Jan Grewe <jan@faked.org>
Date: Wed, 19 Mar 2014 23:20:38 +0100
Subject: [PATCH] add README

---
 README.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a240aab
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+Photon
+=========
+
+Photon is an image acceleration and modification service (for Jetpack-connected WordPress sites). You can run your own Photon-based CDN for any other (non-Wordpress sites) by using the open source Photon code to grab all images from your site and caching them with Varnish.
+
+Quick & Dirty Instructions:
+
+  - Create a new Apache vHost (e.g. ServerName cdn.example.com)
+  - Make that vHost also respond on a wildcard subdomain (ServerAlias cdn*.example.com)
+  - Configure Apache to use port 81 
+  - Configure Varnish to use port 80 
+  - Use the included Varnish VCL ('examples/varnish.vcl') for caching all images for 1 week if the request was made to one of the CDN hosts
+  - Put all files into the DocumentRoot of the vHost you created
+  - Make sure mod_rewrite is enabled (a2enmod rewrite) and that you are allowed to use the .htaccess file in the DocumentRoot of the vHost (AllowOverride All)
+
+If that's all running, take the address of some image on your site (e.g. http://www.example.com/img/photo.jpg) and prefix it with one of your CDN hosts (e.g. http://cdn0.example.com/www.example.com/img/photo.jpg). 
+
+If everything's working fine, your should not only get the image, but also see in the HTTP headers that Varnish has cached the image (X-Cache: HIT) and won't ask the origin for it again (for a week).
\ No newline at end of file
-- 
GitLab