Welcome! Log In Create A New Profile

Advanced

Problems Proxying Offline Web Application

June 01, 2011 11:38AM
Hi All,

We're in the process of prototyping some HTML5 offline apps. They work offline when running directly from the app server (webrick or unicorn in this case), but they won't work in offline mode when proxying via nginx. We're running 0.8.53. Here's our config:

user nginx;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 65;

ssl_certificate /etc/ssl/cert.crt;
ssl_certificate_key /etc/ssl/key.pem;

upstream application {
server unix:/var/sockets/application.sock fail_timeout=0;
}

server {
listen 80;

client_max_body_size 4G;
server_name server.fqdn.com;
keepalive_timeout 5;
root /srv/www/application;
index index.html;

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://applicaiton;
if ($query_string ~ "^[0-9]+$") {
add_header Cache-Control public;
}
}
}
}

Any help/guidance is much appreciated :)

Thanks,

Curtis
Subject Author Posted

Problems Proxying Offline Web Application

cschiewek June 01, 2011 11:38AM

Re: Problems Proxying Offline Web Application

Thomas Love June 01, 2011 12:48PM

Re: Problems Proxying Offline Web Application

cschiewek June 01, 2011 01:18PM

Re: Problems Proxying Offline Web Application

Antoine Bonavita June 02, 2011 08:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready