nginx -t
При переходе на страницу сайта:
The requested method POST is not allowed for the URL /fb/swatch/index.html
Соответственно, Nginx обрабатывает .html и в нем не может быть php кода а следоватьльно и POST запросов.
Конвертер .htaccess → nginx.conf http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
Apache по умолчанию получает как удаленный IP, IP nginx.
cd /usr/ports/ make search name=mod_rpaf cd /usr/ports/www/mod_rpaf2/ make configure make install make clean
Разкоментируем в httpd.conf → LoadModule rpaf_module
Добавляем в него же:
RPAFproxy_ips 127.0.0.1 78.108.88.73 RPAFEnable On RPAFheader X-Forwarded-For
rpm -ihv http://centos.alt.ru/repository/centos/5/i386/centalt-release-5-3.noarch.rpm #86 rpm -ihv http://centos.alt.ru/repository/centos/5/x86_64/centalt-release-5-3.noarch.rpm #64
vi /etc/yum.repos.d/centalt.repo enabled=0
yum -y --enablerepo=CentALT install mod_rpaf
vi /etc/httpd/conf.d/rpaf.conf LoadModule rpaf_module modules/mod_rpaf-2.0.so RPAFenable On RPAFproxy_ips 127.0.0.1 xx.xx.xx.xx yy.yy.yy.yy
http://nginx.org/en/docs/http/ngx_http_core_module.html#variables – Переменные для логов
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" $host';
access_log /var/log/nginx/access.log main;
server { listen 81.222.215.43; server_name site.ru www.site.ru; if ($host = 'site.ru' ) { rewrite ^/(.*)$ http://www.site.ru/$1 permanent; } }
или
server { listen 80; return 301 http://www.example.org$request_uri; server_name example.org;www.tmcomazo.ru }
Discussion
скрипты для парсинга логов
http://www.inmotionhosting.com/support/website/server-usage/view-level-of-traffic-with-apache-access-log
Посмотреть количество обращений по часам
Посмотреть поминутное количество обращений
nginx location
https://nginx.org/ru/docs/http/ngx_http_core_module.html