update README, move scripts to toplevel

This commit is contained in:
j 2011-11-03 13:32:23 +01:00
commit f9bc5b06be
14 changed files with 53 additions and 84 deletions

33
etc/apache2/vhost.conf.in Normal file
View file

@ -0,0 +1,33 @@
<VirtualHost *:80>
<Location />
Options -Indexes
</Location>
<Directory __PREFIX__>
Order deny,allow
Allow from all
</Directory>
<Location />
XSendFile on
XSendFilePath __PREFIX__
</Location>
Alias /.bzr __PREFIX__/.bzr
Alias /static __PREFIX__/static
Alias /favicon.ico __PREFIX__/static/favicon.ico
Alias /data __PREFIX__/data
Alias /admin/media __PREFIX__/src/django/django/contrib/admin/media
Alias /static/js/jquery.js __PREFIX__/src/django/django/contrib/admin/media/js/jquery.min.js
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/.bzr
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} !^/data
RewriteCond %{REQUEST_URI} !^/admin/media
RewriteRule ^/(.*) http://127.0.0.1:2620/$1 [P]
ServerSignature Off
</VirtualHost>

58
etc/nginx/vhost.in Normal file
View file

@ -0,0 +1,58 @@
server {
#those need to go into /etc/nginx/nginx.conf in the http section
#gzip on;
#gzip_http_version 1.1;
#gzip_vary on;
#gzip_comp_level 6;
#gzip_proxied any;
#gzip_types text/plain text/css text/json text/xml application/json application/xml application/xml+rss text/javascript application/javascript;
#gzip_buffers 16 8k;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
listen 80 default;
#server_name pandora.example.com;
access_log /var/log/nginx/pandora.access.log;
error_log /var/log/nginx/pandora.error.log;
location /admin/media {
root __PREFIX__/src/django/django/contrib;
autoindex on;
}
location /favicon.ico {
root __PREFIX__/static;
}
location /static/ {
root __PREFIX__;
autoindex on;
}
location /data/ {
internal;
root __PREFIX__;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_read_timeout 90; #should be in sync with gunicorn timeout
proxy_connect_timeout 90; #should be in sync with gunicorn timeout
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:2620;
break;
}
client_max_body_size 32m;
}
error_page 404 /404.html;
location /404.html {
root __PREFIX__/static;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location /50x.html {
root __PREFIX__/static;
}
}