Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Why the requests are not cached?

$
0
0
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

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>