Welcome! Log In Create A New Profile

Advanced

Re: json files download

November 19, 2012 10:48PM
Thanks Justin,

here's how my config looks like. Please note the 2 Pyramid apps at the bottom, from which I am trying to server the json file.
Anything obviously wrong with that setup that could be affecting the header?

thanks

========================
user www www;
worker_processes 1;

#error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

#pid /var/db/nginx/nginx.pid;


events {
# After increasing this value You probably should increase limit
# of file descriptors (for example in start_precmd in startup script)
worker_connections 1024;
}


http {
include /opt/local/etc/nginx/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 /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log /var/log/nginx/host.access.log main;

location / {
root share/examples/nginx/html;
index index.html index.htm;
}

#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 share/examples/nginx/html;
}
}

#first pyramid App - App1
server {
listen 80;
server_name app1.com www.app1.com;

access_log /home/app1.com/web/env/access.log;

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 60s;
proxy_send_timeout 90s;
proxy_read_timeout 90s;
proxy_buffering off;
proxy_temp_file_write_size 64k;
proxy_pass http://127.0.0.1:5000;
proxy_redirect off;
}
}

# my second pyramid App - App2
server {
listen 80;
server_name app2.com www.app2.com;

access_log /home/app2.com/logs/access.log;

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 60s;
proxy_send_timeout 90s;
proxy_read_timeout 90s;
proxy_buffering off;
proxy_temp_file_write_size 64k;
proxy_pass http://127.0.0.1:5003;
proxy_redirect off;
}
}
}
</pre>
SubjectAuthorPosted

json files download

umarJune 21, 2012 09:51AM

Re: json files download

Reinis RozitisJune 21, 2012 10:02AM

Re: json files download

umarJune 21, 2012 10:17AM

Re: json files download

Valentin V. BartenevJune 21, 2012 10:02AM

Re: json files download

bachNovember 19, 2012 09:54PM

Re: json files download

Justin DorfmanNovember 19, 2012 10:32PM

Re: json files download

bachNovember 19, 2012 10:48PM

Re: json files download

Justin DorfmanNovember 19, 2012 11:10PM

Re: json files download

bachNovember 19, 2012 11:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 103
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready