aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-04-22 07:03:55 +0000
committerbnewbold <bnewbold@robocracy.org>2011-04-22 07:03:55 +0000
commita50e81a087fc55afcfd75d03bbb1a2a28eef72cd (patch)
treecec8f5c8ad7d0d2657f112d048d443b872434c46
parent650b25a5d804bbca398c7de887897915b3f4e4c5 (diff)
downloadpiccast-a50e81a087fc55afcfd75d03bbb1a2a28eef72cd.zip
piccast-a50e81a087fc55afcfd75d03bbb1a2a28eef72cd.tar.gz
updated static fallthrough system
-rw-r--r--README6
-rw-r--r--doc/nginx.conf29
-rw-r--r--www/favicon.ico0
3 files changed, 34 insertions, 1 deletions
diff --git a/README b/README
index ae71ab9..527611e 100644
--- a/README
+++ b/README
@@ -3,7 +3,8 @@ PicCast Repo README
-------------------
./www/
- Static content to be served up over HTTP (eg, stylesheets)
+ Static content to be served up over HTTP (eg, stylesheets).
+ The webserver will check here first (except for index.html)
./piccast/
Django application base directory
@@ -23,6 +24,9 @@ The django application requires:
- python-feedparser
- python 2.6+ (I think? with pysqlite or whatevah?)
+also, ./www/media/admin/ should be a symlink to the django admin media (eg,
+/usr/share/pyshared/django/contrib/admin/media/)
+
JSON API
--------
/json/feeds/
diff --git a/doc/nginx.conf b/doc/nginx.conf
new file mode 100644
index 0000000..e2e4e3c
--- /dev/null
+++ b/doc/nginx.conf
@@ -0,0 +1,29 @@
+server {
+ listen 80;
+ listen [::]:80;
+ server_name piccast.memeschemes.com;
+
+ access_log /var/log/nginx/access.log;
+
+ location / {
+ # Fallthrough to django if file not found
+ fastcgi_param PATH_INFO $fastcgi_script_name;
+ fastcgi_param REQUEST_METHOD $request_method;
+ fastcgi_param QUERY_STRING $query_string;
+ fastcgi_param SERVER_NAME $server_name;
+ fastcgi_param SERVER_PORT $server_port;
+ fastcgi_param SERVER_PROTOCOL $server_protocol;
+ fastcgi_param CONTENT_TYPE $content_type;
+ fastcgi_param CONTENT_LENGTH $content_length;
+ fastcgi_pass_header Authorization;
+ fastcgi_intercept_errors off;
+ if (!-f $request_filename) {
+ fastcgi_pass unix:/srv/http/piccast.memeschemes.com/django.sock;
+ break;
+ }
+
+ root /srv/http/piccast.memeschemes.com/www;
+ index index.html index.htm;
+ }
+}
+
diff --git a/www/favicon.ico b/www/favicon.ico
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/www/favicon.ico