serg-smirnoff

serg-smirnoff
Рейтинг
139
Регистрация
23.02.2008
nezabor:
1 отключи cgi
2 команда #tail -50 /var/www/httpd-logs/domain.tld.error.log
чего даст?
и уже отсюда плясать

cgi отключил, отключил также пару модулей апача, такие как autoindex и php5_cgi но пока не нормализовалась работа

результат команды:

(все стрикт_стандарты это старая версия phpbb на новой версии php)

root@onlysites ~ # tail -50 /var/www/httpd-logs/schekino.net.error.log
[Mon Oct 21 09:58:57 2013] [error] [client 89.107.196.39] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/, referer: http://www .schekino.net/forum/viewtopic.php?f=41&t=8530&p=116592
[Mon Oct 21 10:05:50 2013] [error] [client 5.255.210.93] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/
[Mon Oct 21 10:09:57 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically, as suming $this from incompatible context in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/search/fulltext_native.php on line 1523, referer: http ://www.schekino.net/forum/viewtopic.php?p=116590
[Mon Oct 21 10:09:57 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::recompose() should not be called statical ly, assuming $this from incompatible context in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_normalizer.php on line 145, referer: htt p://www.schekino.net/forum/viewtopic.php?p=116590
[Mon Oct 21 10:10:28 2013] [error] [client 213.180.206.197] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/
[Mon Oct 21 10:10:28 2013] [error] [client 95.108.129.207] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/
[Mon Oct 21 10:10:31 2013] [error] [client 213.180.206.197] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_tools.php on line 1781, referer: http://www.schekino.net/forum/posting.php?mode=edit&f=3 4&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::recompose() should not be called statical ly in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_normalizer.php on line 145, referer: http://www.schekino.net/forum/posting.php?mod e=edit&f=34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_tools.php on line 1781, referer: http://www.schekino.net/forum/posting.php?mode=edit&f=3 4&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::recompose() should not be called statical ly in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_normalizer.php on line 145, referer: http://www.schekino.net/forum/posting.php?mod e=edit&f=34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_tools.php on line 1781, referer: http://www.schekino.net/forum/posting.php?mode=edit&f=3 4&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_tools.php on line 1663, referer: http://www.schekino.net/forum/posting.php?mode=edit&f= 34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::recompose() should not be called statical ly in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_normalizer.php on line 177, referer: http://www.schekino.net/forum/posting.php?mod e=edit&f=34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_tools.php on line 1663, referer: http://www.schekino.net/forum/posting.php?mode=edit&f= 34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::recompose() should not be called statical ly in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_normalizer.php on line 177, referer: http://www.schekino.net/forum/posting.php?mod e=edit&f=34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically, as suming $this from incompatible context in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/search/fulltext_native.php on line 1523, referer: http ://www.schekino.net/forum/posting.php?mode=edit&f=34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::recompose() should not be called statical ly, assuming $this from incompatible context in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_normalizer.php on line 145, referer: htt p://www.schekino.net/forum/posting.php?mode=edit&f=34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically, as suming $this from incompatible context in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/search/fulltext_native.php on line 1523, referer: http ://www.schekino.net/forum/posting.php?mode=edit&f=34&p=116593
[Mon Oct 21 10:11:49 2013] [error] [client 89.107.196.39] PHP Strict Standards: Non-static method utf_normalizer::recompose() should not be called statical ly, assuming $this from incompatible context in /var/www/serg-smirnoff/data/www/schekino.net/forum/includes/utf/utf_normalizer.php on line 145, referer: htt p://www.schekino.net/forum/posting.php?mode=edit&f=34&p=116593
[Mon Oct 21 10:16:27 2013] [error] [client 89.107.196.39] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/, referer: http://www .schekino.net/forum/viewtopic.php?f=34&t=8408&p=116593
[Mon Oct 21 10:20:32 2013] [error] [client 212.35.173.189] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/
[Mon Oct 21 10:24:45 2013] [error] [client 5.255.210.93] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/
[Mon Oct 21 10:29:35 2013] [error] [client 95.108.129.207] Attempt to serve directory: /var/www/serg-smirnoff/data/www/www.schekino.net/



---------- Добавлено 21.10.2013 в 10:48 ----------

addurl:
Я могу ошибаться, но вроде бы ошибка ушла.
Когда я проверял сайт в самом начале темы, то действительно ловил 403 при первом переходе. Сейчас же мне не удается это повторить ни каким образом.
Я конечно не могу видеть полной картины, но спрошу на всякий: serg-smirnoff, вы проверяли логи более свежей даты?

Ошибка File does not exist 403 заменилась на ошибку Attempt to serve directory

Думаю это после отключения мода autoindex для apache2

Т.е. грубо говоря проблема никуда не ушла, она просто с 403 превратилась в 404. Что-то все равно периодические теряет index.php по неясной причине и запрашивает листинг директории.

WapGraf:
Выключите то что не используется на текущий момент.

я на сегодня все. завтра погоняю, и потестирую с "голым" апачом

actions alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex cache cgi deflate dir env expires fcgid headers include mem_cache mime negotiation php5 php5_cgi reqtimeout rewrite rpaf setenvif status suexec vhost_alias

с чего начинать выключать модули апача?

WapGraf:
Для начала бы определится (по логам) кто виноват: nginx or apache. А после уже голову сушить.

---------- Добавлено 20.10.2013 в 23:30 ----------

Отключите все лишние модули в апаче, и все без чего можно обойтись день-два.

---------- Добавлено 20.10.2013 в 23:31 ----------

Наблюдал ранее такую проблему, но при обращении только в перловским файлам. Был конфликт в модулях апача.

по каким логам? в логах все чисто. в логах никто не виноват )

отключить модули можно. пока не пробовал

попробовал index index.php; проблема не ушла. дело не в том что nginx или apache теряют индекс. дело в том, что им и по какой причине не дает его подгрузить

addurl:
Делаем вывод, что иногда nginx почему то не запрашивает индексный файл, обращаясь просто за листингом в корневую папку. А поскольку в представленном конфиге nginx я не вижу явного указания на стартовый файл, то пробуем указать ему его принудительно.

тут бы понять почему nginx делает это иногда. узнать причину. и устранить ее.

конечно пропишу индекс дефолтно в нжинкс. но что-то подсказывает мне, что это не решит проблему.

причем эта проблема только на трех сайтах на вордпресс. на этом же впс, крутится еще с десяток разных других, на разных других cms

и вот с ними такого не возникает. к чему бы это? )

---------- Добавлено 20.10.2013 в 23:14 ----------

KM.UA:
Ставили какой-то модуль от DDoS на CMS или Apache?

на CMS ставил (ограничитель количества входов в админку), от передобров на админку. но выпилил уже давно. на апач не ставил вроде.

addurl:
А, это уже другой разговор. Всё нужно вытягивать клещами.
Тогда понятно, почему от .htaccess никакого эффекта.

Из чего следует, что вероятно виноват конфиг nginx. Так что нужно смотреть его логи и конфиг.
Для начала можно проверить права на корневую папку сайта, поставить 755. Затем проверить от какого юзера работает nginx и убедится, что этот юзер имеет доступ.

Да имеет он доступ. Если бы проблема была в пользователе, то тогда бы ничего не работало в принципе.

Конфиг nginx

===

user www-data;

worker_processes 2;

timer_resolution 100ms;

worker_rlimit_nofile 8192;

worker_priority -10;

pid /var/run/nginx.pid;

events {

#worker_connections 768;

worker_connections 2048;

use epoll;

# multi_accept on;

}

http {

##

# Basic Settings

##

sendfile on;

tcp_nopush on;

tcp_nodelay on;

keepalive_timeout 5 5;

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_min_length 1100;

gzip_disable "msie6";

gzip_vary on;

gzip_proxied any;

gzip_comp_level 3;

gzip_buffers 64 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;

client_body_timeout 10;

client_header_timeout 10;

send_timeout 10;

##

# nginx-naxsi config

##

# Uncomment it if you installed nginx-naxsi

##

#include /etc/nginx/naxsi_core.rules;

##

# nginx-passenger config

##

# Uncomment it if you installed nginx-passenger

##

#passenger_root /usr;

#passenger_ruby /usr/bin/ruby;

##

# Virtual Host Configs

##

include /etc/nginx/conf.d/*.conf;

include /etc/nginx/sites-enabled/*;

include /usr/local/ispmgr/etc/nginx.domain;

client_max_body_size 16M;

log_format isp '$bytes_sent $request_length';

server {

server_name schekino.net www.schekino.net;

listen 88.198.199.18;

disable_symlinks if_not_owner from=$root_path/$subdomain;

set $root_path /var/www/serg-smirnoff/data/www/schekino.net;

set $subdomain "";

location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {

root $root_path/$subdomain;

access_log /var/www/nginx-logs/serg-smirnoff isp;

access_log /var/www/httpd-logs/schekino.net.access.log ;

error_page 404 = @fallback;

}

location / {

proxy_pass http://88.198.199.18:81;

proxy_redirect http://88.198.199.18:81/ /;

proxy_set_header Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;

}

location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {

proxy_pass http://88.198.199.18:81;

proxy_redirect http://88.198.199.18:81/ /;

proxy_set_header Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;

}

location @fallback {

proxy_pass http://88.198.199.18:81;

proxy_set_header Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;

}

include /usr/local/ispmgr/etc/nginx.inc;

if ($host ~* ^((.*).schekino.net)$) {

set $subdomain ../$1;

}

}

server_names_hash_bucket_size 72;

server_names_hash_max_size 1024;

}

===

nginx на фронтэнд. вместо username username там serg-smirnoff serg-smirnoff соответственно этот юзер и имеет все соотв. права.

понятно что ситуация не типовая. потому что если бы она была типовая, то 403 висел бы всегда. и решалось бы все через Options

но 403 появляется внезапно, и далеко не всегда.

---------- Добавлено 20.10.2013 в 18:37 ----------

addurl:
проверить конечную настройку для сайта и сравнить юзеров в конфиге и по доступу к файлам и папкам сайта.

руками не проверял, проверить можно. но чувствую что с правами и юзерами там все нормально.

WapGraf:
Смотрите основной лог ошибок апача, не по домену. Возможно он подскажет.

Лог ошибок апача на момент 403 выглядит примерно так

Перезапуск я делал в эти моменты руками (это и зафиксировано в логах)

---------- Добавлено 20.10.2013 в 13:46 ----------

addurl:

Расскажите о результатах.

Все это пробовал. Не катит.

addurl:

Я не гуру по WP конечно, но этот файл нигде не случаем инклудится на главную?
Может плагином каким нибудь. Я бы попробовал отключить этот кусок на проблемном сайте, где часто возникает эта ошибка и посмотреть что будет.

Даже если да, то пробовал затирать эту часть конфига, но ошибка не пропала

Всего: 280