Open GoogleCodeExporter opened 9 years ago
Hi, Can you show me your debug log and config file? To activate debugging log
you have to compile nginx with --with-debug configure option and set debug
level in error_log directive.
Thanks.
Original comment by yaoweibin@gmail.com
on 23 Feb 2011 at 8:46
Here is config
file ngnix.conf:
----------------
user nginx nginx;
worker_processes 4;
#error_log logs/error.log info;
error_log logs/error.log debug;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
resolver 127.0.0.1;
include options.conf;
include mime.types;
charset utf-8;
override_charset on;
source_charset iso-8859-1;
charset_map iso-8859-1 utf-8 { }
proxy_buffers 8 64k;
proxy_connect_timeout 5s;
proxy_read_timeout 5s;
proxy_send_timeout 5s;
proxy_next_upstream off;
proxy_intercept_errors off;
proxy_cache_path /usr/local/nginx/proxy_temp/ levels=1:2 keys_zone=cache-zone:10m inactive=10m max_size=1000M;
proxy_store_access user:rw group:rw all:r;
include gymboree.conf;
access_log logs/access.log main;
}
file options.conf:
-----------------
## Size Limits
client_body_buffer_size 128K;
client_header_buffer_size 1M;
client_max_body_size 1M;
large_client_header_buffers 8 8k;
## Timeouts
client_body_timeout 60;
client_header_timeout 60;
expires 24h;
keepalive_timeout 60 60;
send_timeout 60;
## General Options
ignore_invalid_headers on;
keepalive_requests 100;
limit_zone gulag $binary_remote_addr 5m;
recursive_error_pages on;
sendfile on;
server_name_in_redirect off;
server_tokens off;
## TCP options
tcp_nodelay on;
tcp_nopush on;
## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 1;
gzip_http_version 1.0;
gzip_min_length 1024;
gzip_types text/plain text/css image/x-icon application/x-perl application/x-httpd-cgi;
gzip_vary on;
## Log Format
log_format main '$remote_addr $host $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
file gymboree.conf:
-------------------
server {
listen 80;
server_name gymboree-russia.com;
access_log logs/gymboree-russia.access.log main;
error_log logs/gymboree-russia.error.log debug;
index index.html;
root /usr/local/nginx/html/gymboree-russia;
## redirect www to nowww
if ($host = 'www.gymboree-russia.com' ) {
rewrite ^/(.*)$ http://gymboree-russia.com/$1 permanent;
}
# Redirect buggy pages
# Product Viwer
rewrite ^/(shop/prod_close_up.*) http://www.gymboree.com/$1 permanent;
## Only allow these request methods
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
# location ^~ /gymboree.hs.llnwd.net/ {
location ^~ /e2/ {
root /usr/local/nginx/html/gymboree-russia.com;
access_log logs/1.access.log;
error_log logs/1.error.log debug;
# try_files $uri $uri/ @static;
error_page 400 401 402 403 404 405 406 = @static;
}
location @static {
proxy_pass http://gymboree.hs.llnwd.net$uri;
proxy_store /usr/local/nginx/html/gymboree-russia.com${uri};
expires max;
access_log logs/2.access.log;
error_log logs/2.error.log debug;
}
location / {
# include gymboree-transform.conf;
# Just buggy subs
include gymboree-test.conf;
proxy_pass http://gymboree.com;
proxy_redirect off;
proxy_cache cache-zone;
proxy_cache_min_uses 2;
proxy_cache_valid 200 1h;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# # redirect server error pages to the static page /50x.html
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# root html;
# }
}
file gymboree-test.conf:
-----------------------
#sub_filter 'http://gymboree.hs.llnwd.net/e2/media/GYM/images/'
'http://gymboree-russia.com/e2/media/GYM/images/' ;
#sub_filter_once off;
subs_filter_types text/html;
subs_filter '<title[^>]*>(.*?)</title>' '<title>Gymboree в Росии -
Детская одежда</title>' oir;
# Bug in multiply translation!
subs_filter 'http://gymboree.hs.llnwd.net/e2/media/GYM/images/'
'http://gymboree-russia.com/e2/media/GYM/images/' gr;
Original comment by r.shishkin@gmail.com
on 23 Feb 2011 at 9:54
Attachments:
done, Try the latest revision. This bug should be fixed.
Thanks for your detail report.
Original comment by yaoweibin@gmail.com
on 24 Feb 2011 at 4:17
It works good. Probably need some more tests to be sure.
Thank you!
Original comment by r.shishkin@gmail.com
on 24 Feb 2011 at 6:30
Original issue reported on code.google.com by
r.shishkin@gmail.com
on 23 Feb 2011 at 7:31