Welcome! Log In Create A New Profile

Advanced

Why the requests are not cached?

Posted by finebird 
Why the requests are not cached?
March 12, 2013 06:37AM
I try to configure amazon ec2 as a reverse proxy with cache for google app engine application.

I'm completely new to nginx so maybe I've done something stupid...

The requests that are sent to ec2 frontend are successfully forwared to app engine backend, however when sending the same request it always arrives to the backend - meaning that it is not served from the frontend cache
My nginx.conf is as follow:

#user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;


proxy_cache_path /etc/nginx/cache levels=1:2 keys_zone=one:10m;


server {
listen 80;
server_name ec2-54-224-24-77.compute-1.amazonaws.com;

proxy_pass http://plr-world.appspot.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-HOST $host;
#proxy_set_header Host $host;

proxy_cache one;

}

}

Where can be a problem?
I'll appreciate you help on the issue!
Thanks in advance
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 95
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