Nginx Architecture in deep
pk899
nginx-forum at nginx.us
Sat Jun 4 08:26:37 MSD 2011
Thanks appa.
My question is: if the setup works with two ports, how come it stops
working when the ports are switched?
Anyway, my config:
proxy_cache_path /dev/shm/proxy_cache levels=1:2
keys_zone=proxyone:10m inactive=10m max_size=100m;
proxy_cache_key "$scheme$host$request_uri$cookie___user";
proxy_cache proxyone;
proxy_cache_min_uses 1;
proxy_cache_valid any 60s;
proxy_cache_valid 404 0s;
proxy_cache_valid 500 502 503 504 1s;
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SERVER BLOCK
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
server
{
listen 77.12.16.8:89;
server_name mydomain.com www.mydomain.com;
root /home/mydomain/public_html;
index index index.php index.html;
error_page 403 = @backend;
error_page 404 = @backend;
error_page 406 = @backend;
error_page 500 = @backend;
location / {
location
~.*\.(gif|jpg|png|ico|swf|rss|xml|htm|txt|js|css|gz|doc|xls|pdf)$ {
expires max;
try_files $uri @backend;
log_not_found off;
}
proxy_pass http://77.12.16.8:80;
include proxy.inc;
}
location @backend {
internal;
proxy_pass http://77.12.16.8:80;
include proxy.inc;
}
} # End of server block
And in Apache:
### RPAF STUFF FOR NGINX PROXYING
LoadModule rpaf_module modules/mod_rpaf-2.0.so
RPAFenable On
RPAFproxy_ips 127.0.0.1 77.12.16.8
RPAFsethostname On
RPAFheader X-Real-IP
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,202956,203802#msg-203802
More information about the nginx
mailing list