Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- worker_processes 1;
- error_log logs/error.log;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
- pid logs/nginx.pid;
- events {
- worker_connections 1024;
- use epoll;
- }
- http {
- # Enumerate all the Tornado servers here
- upstream frontends {
- # least_conn;
- server pam-picaxe.rhcloud.com:80;
- # server 127.8.143.129:15000;
- }
- include mime.types;
- default_type application/octet-stream;
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- access_log logs/access.log main;
- keepalive_timeout 65;
- proxy_read_timeout 200;
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- gzip on;
- gzip_min_length 1000;
- gzip_proxied any;
- gzip_types text/plain text/html text/css text/xml
- application/x-javascript application/xml
- application/atom+xml text/javascript;
- # Only retry if there was a communication error, not a timeout
- # on the Tornado server (to avoid propagating "queries of death"
- # to all frontends)
- proxy_next_upstream error;
- server {
- listen 127.8.143.129:8080;
- #server_name localhost;
- ssl off;
- # Allow file uploads
- client_max_body_size 10M;
- #charset koi8-r;
- #access_log logs/host.access.log main;
- location ^~ /static/ {
- root /blahblah/runtime/repo/static;
- if ($query_string) {
- expires max;
- }
- }
- location = /favicon.ico {
- rewrite (.*) /static/favicon.ico;
- }
- location = /robots.txt {
- rewrite (.*) /static/robots.txt;
- }
- location / {
- #proxy_pass_header Server;
- #proxy_set_header Host $host;
- #proxy_redirect off;
- #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- #proxy_set_header X-Real-IP $remote_addr;
- #proxy_set_header X-Scheme $scheme;
- #proxy_set_header X-Url-Scheme $scheme;
- proxy_pass http://frontends;
- proxy_redirect off;
- proxy_http_version 1.1;
- }
- error_page 404 /404.html;
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement