P
P
Pavel Galkin2011-06-22 23:08:12
Nginx
Pavel Galkin, 2011-06-22 23:08:12

Strange behavior of nginx?

I encountered strange behavior of nginx on one of the servers. When trying to access the page, we get the contents of the directory, i.e. we see scripts in the directory, folder structure, etc., or we get 403. At the same time, you can’t go through the folders, it won’t let you. But to turn to a specific script - you can, without viewing the contents of the file - clicking on index.php will open the site.
Details below...
By the time of occurrence and sites - randomly, but not more than once a day or five. It is treated by deleting the cache and reloading the page. There is nothing interesting in the logs, no specific errors. There is nothing similar on other machines, the configs are similar. Previously, too, did not encounter such behavior. When accessing Apache directly, there is nothing like that, the site opens as it should.
So far the search has turned up nothing.
any ideas?
Some of the configuration files:
proxy_cache_path /var/tmp/domain levels=1:2 keys_zone=domain:32m inactive=7d;
Main location:
location / {
proxy_cache domain;
proxy_cache_key "$request_method|$is_args|$host|$request_uri";
proxy_hide_header "Set-Cookie";
proxy_ignore_headers "Cache-Control" "Expires";
proxy_cache_valid 200 302 304 10m;
proxy_cache_valid 301 1h;
proxy_cache_valid 503 1m;
proxy_cache_valid any 5m;
proxy_cache_use_stale http_502 http_503 http_504;
proxy_pass domain-ip :8080;
proxy_redirect domain.ru :8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; }
Server parameters: debian 5, nginx 0.86->1.02 (changed the version, the rake remained), apache2.2+mod_php, site on Joomla (don't hit with stones, it just happened)
PS: I suspect that it's some kind of incorrect update cache, but how to prove or fix it is not clear. I'm trying to change keys_zone up and inactive down. It is not yet clear.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rdolgov, 2011-06-23
@rdolgov

try disabling the cache and test

D
dodarium, 2011-06-23
@dodarium

Hmm ... some strange things! And what does nginx write in the logs at the moment when it shows this? Maybe he manages to send a “cunning” request to achacha instead of accessing the cache. Here you still need to look at the Apache logs.
You need to try to remove: proxy_cache_valid any 5m;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question