total cleanup

This commit is contained in:
magnolia-fan
2011-06-13 16:54:56 +04:00
parent 1d9a0398c6
commit 447239f824
49 changed files with 571 additions and 1854 deletions
-47
View File
@@ -1,47 +0,0 @@
worker_processes 1;
error_log logs/error.log debug;
events {
worker_connections 256;
}
http {
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain;
upstream mongrel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name bh.vim.me localhost susanna brooklyn;
#root /Users/chez/Sites;
#index index.html index.htm;
try_files $uri @mongrel;
location @mongrel {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://mongrel;
}
include proxy.conf;
#error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
-43
View File
@@ -1,43 +0,0 @@
# Proxy download
location ~* ^/proxy-stream/(.*?)/(.*?)/(.*?)/(.*?)/(.*) {
# Do not allow people to mess with this location directly
# Only internal redirects are allowed
internal;
# Location-specific logging
#access_log logs/proxy_stream.access.log debug;
#error_log logs/proxy_stream.error.log debug;
# Extract download url from the request
set $token $1;
set $remixsid $2;
set $remixchk $3;
set $download_host $4;
set $download_uri $5;
# Compose download url
set $download_url http://$download_host/$download_uri;
# Compose cookie string
set $cookie "remixsid=$remixsid;remixchk=$remixchk";
# Set download request headers
proxy_set_header Host $download_host;
proxy_set_header Cookie $cookie;
proxy_set_header Referer "http://vkontakte.ru/audio?album_id=0";
# The next two lines could be used if your storage
# backend does not support Content-Disposition
# headers used to specify file name browsers use
# when save content to the disk
proxy_ignore_headers Cache-Control Expires;
# Do not touch local disks when proxying
# content to clients
proxy_max_temp_file_size 0;
# Download the file and send it to client
resolver 192.168.0.1;
proxy_pass $download_url;
}