Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (49 sloc) 1.29 KB
# -*-conf-*-
#
# occupywallst nginx config (local development)
#
# /etc/hosts
# 127.0.2.1 occupywallst.dev
# 127.0.2.2 chat.occupywallst.dev
#
upstream ows {
server 127.0.0.1:9000;
}
upstream icecast {
server 127.0.0.1:9040;
}
server {
listen 127.0.2.1:80 default;
server_name occupywallst.dev;
server_name_in_redirect on;
access_log off;
location ~ /\. { deny all; }
location = /favicon.ico { access_log off; return 404; }
location = /robots.txt { access_log off; return 404; }
location = /sitemap.xml { access_log off; return 404; }
location /media/ {
root /opt/ows/occupywallst/occupywallst;
}
location /stream/ {
rewrite ^/stream/(.*)$ /$1 break;
proxy_pass http://icecast;
proxy_connect_timeout 1;
proxy_redirect off;
proxy_buffering off;
}
location / {
if ($uri !~ /$) {
rewrite ^(.*)$ $1/ permanent;
}
proxy_pass http://ows;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host occupywallst.dev;
proxy_redirect off;
proxy_connect_timeout 5000ms;
# proxy_send_timeout 200ms;
# proxy_read_timeout 200ms;
# # you need me in nginx.conf to limit ips to 30 requests per min
# # limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m;
# limit_req zone=one burst=10;
}
}