nginx apache2 (rpaf-0.6)
over at nn.ru
over at nn.ru
Tue Dec 2 17:28:24 MSK 2008
Доброго времени суток,
есть:
Debian
- nginx/0.6.34
- apache2
- rpaf(0.6
- php5
# apache2 -V
Server version: Apache/2.2.3
Server built: Sep 6 2008 09:52:20
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
# cat /etc/apache2/mods-enabled/rpaf.conf
RPAFenable On
RPAFproxy_ips 127.0.0.1 10.0.3.3
RPAFsethostname On
RPAFheader X-Forwarded-For
nginx.conf:
---- [ cut ] -----
location / {
proxy_pass http://10.0.3.3:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
---- [ cut ] -----
проблема:
в .htaccess :
Order Allow,Deny
Deny From All
Allow From 127.0.0.1
Allow From 10.0.3.4
Allow From 10.0.3.5
Allow From 10.0.3.6
в php $_SERVER['REMOTE_ADDR'] отдаёт всё нормально, в логах апача REMOTE_ADDR тоже правильный, но в .htaccess попадает какойто другой адрес и возникает 403, в чём может быть проблема ?
похожую проблему нашёл здесь http://www.opennet.ru/openforum/vsluhforumID8/6014.html .
исходник самого mop_rpaf в аттаче.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_rpaf-2.0.c
Type: text/x-csrc
Size: 9652 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20081202/27c29494/attachment.c>
More information about the nginx-ru
mailing list