mod_extract_forwarded:Pound環境下のApacheのログにリモートのIPアドレスを記録
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[Apache]]
*概要 [#s73540c3]
Pound環境下のApacheではログにはリモートIPアドレスが127.0....
また、Allow fromディレクティブも使用できないようなので困...
*作業ログ [#ba793c6f]
[root@master01 conf.d]# cat /var/log/httpd/www.inamuu.co...
127.0.0.1 - - [28/Jan/2014:12:18:44 +0900] "GET /index.p...
[root@master01 conf.d]# yum install mod_extract_forwarded
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
epel/metalink ...
* base: www.ftp.ne.jp
* epel: ftp.iij.ad.jp
* extras: www.ftp.ne.jp
* updates: centosi5.centos.org
base ...
epel ...
epel/primary_db ...
extras ...
updates ...
updates/primary_db ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_extract_forwarded.x86_64 0:2.0.2-8.el6 ...
--> Finished Dependency Resolution
Dependencies Resolved
========================================================...
Package Arch Ve...
========================================================...
Installing:
mod_extract_forwarded x86_64 2....
Transaction Summary
========================================================...
Install 1 Package(s)
Total download size: 15 k
Installed size: 29 k
Is this ok [y/N]: y
Downloading Packages:
mod_extract_forwarded-2.0.2-8.el6.x86_64.rpm ...
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mod_extract_forwarded-2.0.2-8.el6.x86_64 ...
Verifying : mod_extract_forwarded-2.0.2-8.el6.x86_64 ...
Installed:
mod_extract_forwarded.x86_64 0:2.0.2-8.el6
Complete!
[root@master01 conf.d]# pwd
/etc/httpd/conf.d
[root@master01 conf.d]# ls -l
合計 40
-rw-r--r-- 1 root root 392 8月 14 02:30 2013 README
-rw-r--r-- 1 root root 2699 7月 30 07:10 2011 mod_extra...
[root@master01 conf.d]# cp -p mod_extract_forwarded.conf...
[root@master01 conf.d]# vi mod_extract_forwarded.conf
# MEFaccept 1.2.3.4 1.2.3.5
MEFaccept 127.0.0.1
[root@master01 conf.d]# service httpd configtest
Syntax OK
[root@master01 conf.d]# service httpd graceful
[root@master01 conf.d]# tail -f /var/log/httpd/www.inamu...
182.249.***.*** - - [28/Jan/2014:12:21:34 +0900] "GET /f...
↑携帯のIPアドレスがログに記述されるようになりました。
参考URL:http://futuremix.org/2012/01/pound-apache-ip-add...
終了行:
[[Apache]]
*概要 [#s73540c3]
Pound環境下のApacheではログにはリモートIPアドレスが127.0....
また、Allow fromディレクティブも使用できないようなので困...
*作業ログ [#ba793c6f]
[root@master01 conf.d]# cat /var/log/httpd/www.inamuu.co...
127.0.0.1 - - [28/Jan/2014:12:18:44 +0900] "GET /index.p...
[root@master01 conf.d]# yum install mod_extract_forwarded
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
epel/metalink ...
* base: www.ftp.ne.jp
* epel: ftp.iij.ad.jp
* extras: www.ftp.ne.jp
* updates: centosi5.centos.org
base ...
epel ...
epel/primary_db ...
extras ...
updates ...
updates/primary_db ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_extract_forwarded.x86_64 0:2.0.2-8.el6 ...
--> Finished Dependency Resolution
Dependencies Resolved
========================================================...
Package Arch Ve...
========================================================...
Installing:
mod_extract_forwarded x86_64 2....
Transaction Summary
========================================================...
Install 1 Package(s)
Total download size: 15 k
Installed size: 29 k
Is this ok [y/N]: y
Downloading Packages:
mod_extract_forwarded-2.0.2-8.el6.x86_64.rpm ...
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mod_extract_forwarded-2.0.2-8.el6.x86_64 ...
Verifying : mod_extract_forwarded-2.0.2-8.el6.x86_64 ...
Installed:
mod_extract_forwarded.x86_64 0:2.0.2-8.el6
Complete!
[root@master01 conf.d]# pwd
/etc/httpd/conf.d
[root@master01 conf.d]# ls -l
合計 40
-rw-r--r-- 1 root root 392 8月 14 02:30 2013 README
-rw-r--r-- 1 root root 2699 7月 30 07:10 2011 mod_extra...
[root@master01 conf.d]# cp -p mod_extract_forwarded.conf...
[root@master01 conf.d]# vi mod_extract_forwarded.conf
# MEFaccept 1.2.3.4 1.2.3.5
MEFaccept 127.0.0.1
[root@master01 conf.d]# service httpd configtest
Syntax OK
[root@master01 conf.d]# service httpd graceful
[root@master01 conf.d]# tail -f /var/log/httpd/www.inamu...
182.249.***.*** - - [28/Jan/2014:12:21:34 +0900] "GET /f...
↑携帯のIPアドレスがログに記述されるようになりました。
参考URL:http://futuremix.org/2012/01/pound-apache-ip-add...
ページ名: