Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 3.144.91.201
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
apache /
manual /
[ HOME SHELL ]
Name
Size
Permission
Action
developer
[ DIR ]
drwxr-xr-x
faq
[ DIR ]
drwxr-xr-x
howto
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
misc
[ DIR ]
drwxr-xr-x
mod
[ DIR ]
drwxr-xr-x
platform
[ DIR ]
drwxr-xr-x
programs
[ DIR ]
drwxr-xr-x
rewrite
[ DIR ]
drwxr-xr-x
ssl
[ DIR ]
drwxr-xr-x
style
[ DIR ]
drwxr-xr-x
vhosts
[ DIR ]
drwxr-xr-x
BUILDING
102
B
-rw-r--r--
LICENSE
11.09
KB
-rw-r--r--
bind.html
538
B
-rw-r--r--
bind.html.de
15.28
KB
-rw-r--r--
bind.html.en
15.19
KB
-rw-r--r--
bind.html.fr.utf8
16.49
KB
-rw-r--r--
bind.html.ja.utf8
14.34
KB
-rw-r--r--
bind.html.ko.euc-kr
10.95
KB
-rw-r--r--
bind.html.tr.utf8
16.21
KB
-rw-r--r--
caching.html
292
B
-rw-r--r--
caching.html.en
50.66
KB
-rw-r--r--
caching.html.fr.utf8
56.43
KB
-rw-r--r--
caching.html.tr.utf8
54.69
KB
-rw-r--r--
configuring.html
580
B
-rw-r--r--
configuring.html.de
16.71
KB
-rw-r--r--
configuring.html.en
17.36
KB
-rw-r--r--
configuring.html.fr.utf8
18.84
KB
-rw-r--r--
configuring.html.ja.utf8
16.98
KB
-rw-r--r--
configuring.html.ko.euc-kr
13.71
KB
-rw-r--r--
configuring.html.tr.utf8
18.57
KB
-rw-r--r--
content-negotiation.html
529
B
-rw-r--r--
content-negotiation.html.en
33.75
KB
-rw-r--r--
content-negotiation.html.fr.ut...
38.73
KB
-rw-r--r--
content-negotiation.html.ja.ut...
40.97
KB
-rw-r--r--
content-negotiation.html.ko.eu...
28.48
KB
-rw-r--r--
content-negotiation.html.tr.ut...
37.08
KB
-rw-r--r--
convenience.map
36.73
KB
-rw-r--r--
custom-error.html
586
B
-rw-r--r--
custom-error.html.en
13.58
KB
-rw-r--r--
custom-error.html.es
13.3
KB
-rw-r--r--
custom-error.html.fr.utf8
14.51
KB
-rw-r--r--
custom-error.html.ja.utf8
13.21
KB
-rw-r--r--
custom-error.html.ko.euc-kr
11.52
KB
-rw-r--r--
custom-error.html.tr.utf8
14.17
KB
-rw-r--r--
dns-caveats.html
489
B
-rw-r--r--
dns-caveats.html.en
12.37
KB
-rw-r--r--
dns-caveats.html.fr.utf8
13.39
KB
-rw-r--r--
dns-caveats.html.ja.utf8
17.37
KB
-rw-r--r--
dns-caveats.html.ko.euc-kr
13.47
KB
-rw-r--r--
dns-caveats.html.tr.utf8
12.79
KB
-rw-r--r--
dso.html
449
B
-rw-r--r--
dso.html.en
19.27
KB
-rw-r--r--
dso.html.fr.utf8
22.21
KB
-rw-r--r--
dso.html.ja.utf8
23.28
KB
-rw-r--r--
dso.html.ko.euc-kr
16.59
KB
-rw-r--r--
dso.html.tr.utf8
21.48
KB
-rw-r--r--
env.html
449
B
-rw-r--r--
env.html.en
30.62
KB
-rw-r--r--
env.html.fr.utf8
33.06
KB
-rw-r--r--
env.html.ja.utf8
30.56
KB
-rw-r--r--
env.html.ko.euc-kr
22.14
KB
-rw-r--r--
env.html.tr.utf8
32.71
KB
-rw-r--r--
expr.html
199
B
-rw-r--r--
expr.html.en
36.03
KB
-rw-r--r--
expr.html.fr.utf8
38.48
KB
-rw-r--r--
filter.html
550
B
-rw-r--r--
filter.html.en
14.84
KB
-rw-r--r--
filter.html.es
17.28
KB
-rw-r--r--
filter.html.fr.utf8
16.01
KB
-rw-r--r--
filter.html.ja.utf8
9.23
KB
-rw-r--r--
filter.html.ko.euc-kr
8.37
KB
-rw-r--r--
filter.html.tr.utf8
16
KB
-rw-r--r--
getting-started.html
316
B
-rw-r--r--
getting-started.html.en
15.22
KB
-rw-r--r--
getting-started.html.fr.utf8
17.18
KB
-rw-r--r--
getting-started.html.ru.utf8
21.27
KB
-rw-r--r--
glossary.html
650
B
-rw-r--r--
glossary.html.de
34.8
KB
-rw-r--r--
glossary.html.en
30.02
KB
-rw-r--r--
glossary.html.es
31.97
KB
-rw-r--r--
glossary.html.fr.utf8
34.01
KB
-rw-r--r--
glossary.html.ja.utf8
32.03
KB
-rw-r--r--
glossary.html.ko.euc-kr
20.88
KB
-rw-r--r--
glossary.html.tr.utf8
33.11
KB
-rw-r--r--
handler.html
649
B
-rw-r--r--
handler.html.en
11.79
KB
-rw-r--r--
handler.html.es
12.72
KB
-rw-r--r--
handler.html.fr.utf8
12.6
KB
-rw-r--r--
handler.html.ja.utf8
13.36
KB
-rw-r--r--
handler.html.ko.euc-kr
11.35
KB
-rw-r--r--
handler.html.tr.utf8
12.39
KB
-rw-r--r--
handler.html.zh-cn.utf8
11.34
KB
-rw-r--r--
index.html
981
B
-rw-r--r--
index.html.da
8.85
KB
-rw-r--r--
index.html.de
9.28
KB
-rw-r--r--
index.html.en
9.11
KB
-rw-r--r--
index.html.es
9.75
KB
-rw-r--r--
index.html.fr.utf8
9.47
KB
-rw-r--r--
index.html.ja.utf8
9.55
KB
-rw-r--r--
index.html.ko.euc-kr
8.23
KB
-rw-r--r--
index.html.pt-br
9.26
KB
-rw-r--r--
index.html.ru.utf8
10.41
KB
-rw-r--r--
index.html.tr.utf8
9.34
KB
-rw-r--r--
index.html.zh-cn.utf8
8.85
KB
-rw-r--r--
install.html
643
B
-rw-r--r--
install.html.de
25.56
KB
-rw-r--r--
install.html.en
26.97
KB
-rw-r--r--
install.html.es
29.38
KB
-rw-r--r--
install.html.fr.utf8
29.42
KB
-rw-r--r--
install.html.ja.utf8
27.58
KB
-rw-r--r--
install.html.ko.euc-kr
19.83
KB
-rw-r--r--
install.html.tr.utf8
29.06
KB
-rw-r--r--
invoking.html
650
B
-rw-r--r--
invoking.html.de
13.91
KB
-rw-r--r--
invoking.html.en
12.55
KB
-rw-r--r--
invoking.html.es
13.9
KB
-rw-r--r--
invoking.html.fr.utf8
13.42
KB
-rw-r--r--
invoking.html.ja.utf8
14.04
KB
-rw-r--r--
invoking.html.ko.euc-kr
10.87
KB
-rw-r--r--
invoking.html.tr.utf8
13.39
KB
-rw-r--r--
license.html
118
B
-rw-r--r--
license.html.en
15.49
KB
-rw-r--r--
logs.html
454
B
-rw-r--r--
logs.html.en
39.03
KB
-rw-r--r--
logs.html.fr.utf8
44.23
KB
-rw-r--r--
logs.html.ja.utf8
40.13
KB
-rw-r--r--
logs.html.ko.euc-kr
29.03
KB
-rw-r--r--
logs.html.tr.utf8
42.61
KB
-rw-r--r--
mpm.html
704
B
-rw-r--r--
mpm.html.de
11.13
KB
-rw-r--r--
mpm.html.en
13.26
KB
-rw-r--r--
mpm.html.es
10.46
KB
-rw-r--r--
mpm.html.fr.utf8
14.37
KB
-rw-r--r--
mpm.html.ja.utf8
11.7
KB
-rw-r--r--
mpm.html.ko.euc-kr
9.77
KB
-rw-r--r--
mpm.html.tr.utf8
14.19
KB
-rw-r--r--
mpm.html.zh-cn.utf8
11.26
KB
-rw-r--r--
new_features_2_0.html
712
B
-rw-r--r--
new_features_2_0.html.de
17.67
KB
-rw-r--r--
new_features_2_0.html.en
15.55
KB
-rw-r--r--
new_features_2_0.html.fr.utf8
18.27
KB
-rw-r--r--
new_features_2_0.html.ja.utf8
18.56
KB
-rw-r--r--
new_features_2_0.html.ko.euc-k...
14.52
KB
-rw-r--r--
new_features_2_0.html.pt-br
17.4
KB
-rw-r--r--
new_features_2_0.html.tr.utf8
17.37
KB
-rw-r--r--
new_features_2_2.html
520
B
-rw-r--r--
new_features_2_2.html.en
18.58
KB
-rw-r--r--
new_features_2_2.html.fr.utf8
20.73
KB
-rw-r--r--
new_features_2_2.html.ko.euc-k...
9.46
KB
-rw-r--r--
new_features_2_2.html.pt-br
10.81
KB
-rw-r--r--
new_features_2_2.html.tr.utf8
20.42
KB
-rw-r--r--
new_features_2_4.html
319
B
-rw-r--r--
new_features_2_4.html.en
28.17
KB
-rw-r--r--
new_features_2_4.html.fr.utf8
31.61
KB
-rw-r--r--
new_features_2_4.html.tr.utf8
30.66
KB
-rw-r--r--
sections.html
474
B
-rw-r--r--
sections.html.en
37.51
KB
-rw-r--r--
sections.html.fr.utf8
41.64
KB
-rw-r--r--
sections.html.ja.utf8
32.81
KB
-rw-r--r--
sections.html.ko.euc-kr
25.12
KB
-rw-r--r--
sections.html.tr.utf8
41.4
KB
-rw-r--r--
server-wide.html
489
B
-rw-r--r--
server-wide.html.en
11.88
KB
-rw-r--r--
server-wide.html.fr.utf8
12.41
KB
-rw-r--r--
server-wide.html.ja.utf8
12.02
KB
-rw-r--r--
server-wide.html.ko.euc-kr
10.41
KB
-rw-r--r--
server-wide.html.tr.utf8
12.4
KB
-rw-r--r--
sitemap.html
736
B
-rw-r--r--
sitemap.html.de
26.2
KB
-rw-r--r--
sitemap.html.en
25.95
KB
-rw-r--r--
sitemap.html.es
25.86
KB
-rw-r--r--
sitemap.html.fr.utf8
27.01
KB
-rw-r--r--
sitemap.html.ja.utf8
26.42
KB
-rw-r--r--
sitemap.html.ko.euc-kr
23.11
KB
-rw-r--r--
sitemap.html.tr.utf8
26.88
KB
-rw-r--r--
sitemap.html.zh-cn.utf8
23.98
KB
-rw-r--r--
socache.html
205
B
-rw-r--r--
socache.html.en
9.54
KB
-rw-r--r--
socache.html.fr.utf8
10.23
KB
-rw-r--r--
stopping.html
650
B
-rw-r--r--
stopping.html.de
19.53
KB
-rw-r--r--
stopping.html.en
17.4
KB
-rw-r--r--
stopping.html.es
19.32
KB
-rw-r--r--
stopping.html.fr.utf8
19.67
KB
-rw-r--r--
stopping.html.ja.utf8
19.98
KB
-rw-r--r--
stopping.html.ko.euc-kr
14.67
KB
-rw-r--r--
stopping.html.tr.utf8
19.55
KB
-rw-r--r--
suexec.html
464
B
-rw-r--r--
suexec.html.en
28.56
KB
-rw-r--r--
suexec.html.fr.utf8
32.24
KB
-rw-r--r--
suexec.html.ja.utf8
33.21
KB
-rw-r--r--
suexec.html.ko.euc-kr
24.09
KB
-rw-r--r--
suexec.html.tr.utf8
31.05
KB
-rw-r--r--
upgrading.html
209
B
-rw-r--r--
upgrading.html.en
29.98
KB
-rw-r--r--
upgrading.html.fr.utf8
33.4
KB
-rw-r--r--
urlmapping.html
484
B
-rw-r--r--
urlmapping.html.en
26.02
KB
-rw-r--r--
urlmapping.html.fr.utf8
28.39
KB
-rw-r--r--
urlmapping.html.ja.utf8
25.7
KB
-rw-r--r--
urlmapping.html.ko.euc-kr
19.33
KB
-rw-r--r--
urlmapping.html.tr.utf8
27.96
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : env.html.ja.utf8
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --> <title>Apache の環境変数 - Apache HTTP サーバ バージョン 2.4</title> <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> <link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> <script src="./style/scripts/prettify.min.js" type="text/javascript"> </script> <link href="./images/favicon.ico" rel="shortcut icon" /></head> <body id="manual-page"><div id="page-header"> <p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p> <p class="apache">Apache HTTP サーバ バージョン 2.4</p> <img alt="" src="./images/feather.png" /></div> <div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> <div id="path"> <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーバ</a> > <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> > <a href="./">バージョン 2.4</a></div><div id="page-content"><div id="preamble"><h1>Apache の環境変数</h1> <div class="toplang"> <p><span>翻訳済み言語: </span><a href="./en/env.html" hreflang="en" rel="alternate" title="English"> en </a> | <a href="./fr/env.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | <a href="./ja/env.html" title="Japanese"> ja </a> | <a href="./ko/env.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | <a href="./tr/env.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> </div> <div class="outofdate">この日本語訳はすでに古くなっている 可能性があります。 最近更新された内容を見るには英語版をご覧下さい。 </div> <p>Apache HTTP サーバは<em>環境変数</em>と呼ばれる、名前のついた 変数に情報を記憶する仕組みを提供しています。この情報はログ収集や アクセス制御などのいろいろな操作を制御するために使うことができます。 これらの変数は CGI スクリプトなどの外部プログラムと通信するためにも 使われます。この文書はそれらの変数の操作方法と使用方法をいくつか 紹介します。</p> <p>これらの変数は<em>環境変数</em>と呼ばれていますが、オペレーティング システムによって制御されている環境変数と同じではありません。 実際は、これらの変数は Apache の内部構造の中に記憶され、操作されています。 それらは、CGI や SSI スクリプトに渡されたときだけ、実際の オペレーティングシステムの環境変数になります。サーバ自身が 実行されているオペレーティングシステムの環境を操作したい場合は、 オペレーティングシステムのシェルが提供している標準の環境変数の 操作方法を使わなければなりません。</p> </div> <div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#setting">環境変数の設定</a></li> <li><img alt="" src="./images/down.gif" /> <a href="#using">環境変数の使用</a></li> <li><img alt="" src="./images/down.gif" /> <a href="#special">特別な目的の環境変数</a></li> <li><img alt="" src="./images/down.gif" /> <a href="#examples">例</a></li> </ul><h3>参照</h3><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> <div class="section"> <h2><a name="setting" id="setting">環境変数の設定</a></h2> <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_env.html">mod_env</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_setenvif.html">mod_setenvif</a></code></li><li><code class="module"><a href="./mod/mod_unique_id.html">mod_unique_id</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code></li><li><code class="directive"><a href="./mod/mod_setenvif.html#browsermatchnocase">BrowserMatchNoCase</a></code></li><li><code class="directive"><a href="./mod/mod_env.html#passenv">PassEnv</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_env.html#setenv">SetEnv</a></code></li><li><code class="directive"><a href="./mod/mod_setenvif.html#setenvif">SetEnvIf</a></code></li><li><code class="directive"><a href="./mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code></li><li><code class="directive"><a href="./mod/mod_env.html#unsetenv">UnsetEnv</a></code></li></ul></td></tr></table> <h3><a name="basic-manipulation" id="basic-manipulation">基本的な環境の操作</a></h3> <p>Apache において環境変数を設定する一番基本的な方法は、 無条件に環境変数を設定する <code class="directive"><a href="./mod/mod_env.html#setenv">SetEnv</a></code> ディレクティブを使用することです。 <code class="directive"><a href="./mod/mod_env.html#passenv">PassEnv</a></code> ディレクティブにより、Apache が起動されたシェルの 環境変数を渡すこともできます。</p> <h3><a name="conditional" id="conditional">リクエスト毎に条件に基づいて設定する</a></h3> <p>より柔軟性を高めるために、mod_setenvif で提供されているディレクティブを使用することで、リクエストの 特性に基づいて環境変数を設定することができます。例えば、特定のブラウザ (User-Agent) のリクエストや特定の Referer [意図的な綴りです] <span class="transnote">(<em>訳注:</em> 正しい綴りは referrer ですが、HTTP の仕様では Referer となっています)</span>ヘッダが見つかったときのみ変数を設定することができます。 mod_rewrite の <code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> ディレクティブにおいて環境変数を設定する <code>[E=...]</code> オプションを使用することで、 より柔軟な設定を行なうことができます。</p> <h3><a name="unique-identifiers" id="unique-identifiers">一意な識別子</a></h3> <p>mod_unique_id は、非常に限られた条件の下で 「すべて」のリクエストについて、一意であることが保証されている値を環境変数 <code>UNIQUE_ID</code> に設定します。</p> <h3><a name="standard-cgi" id="standard-cgi">標準 CGI 変数</a></h3> <p>Apache の設定ファイルで設定された環境変数とシェルから渡される 環境変数に加えて、CGI スクリプトと SSI ページには <a href="http://cgi-spec.golux.com">CGI の仕様</a>で要求されている、 リクエストのメタ情報を持った環境変数の組が提供されます。</p> <h3><a name="caveats" id="caveats">いくつかの注意</a></h3> <ul> <li>環境を操作するディレクティブを使って標準 CGI 変数を上書きしたり変更したりすることはできません。</li> <li>CGI スクリプトを起動するために <code class="program"><a href="./programs/suexec.html">suexec</a></code> が使用されている場合、CGI スクリプトが起動するために、環境変数は<em>安全</em>な環境変数の組に整理されます。 この安全な環境変数の集合は、コンパイル時に <code>suexec.c</code> で定義されます。</li> <li>移植性のために、環境変数の名前はアルファベット、 数字とアンダースコア <span class="transnote">(<em>訳注:</em> '_')</span> だけから成ります。 さらに、最初の文字は数字であってはいけません。 この制限に合わない文字は CGI スクリプトと SSI ページに渡されるときにアンダースコアに置換されます。</li> <li><code class="directive"><a href="./mod/mod_env.html#setenv">SetEnv</a></code> はリクエスト処理の 段階の中でも遅くに実行されます。つまり <code class="directive"><a href="./mod/mod_setenvif.html#setenvif">SetEnvIf</a></code> や <code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code> などからは、変数がそこで設定されていることがわかりません。</li> </ul> </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> <div class="section"> <h2><a name="using" id="using">環境変数の使用</a></h2> <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_authz_host.html">mod_authz_host</a></code></li><li><code class="module"><a href="./mod/mod_cgi.html">mod_cgi</a></code></li><li><code class="module"><a href="./mod/mod_ext_filter.html">mod_ext_filter</a></code></li><li><code class="module"><a href="./mod/mod_headers.html">mod_headers</a></code></li><li><code class="module"><a href="./mod/mod_include.html">mod_include</a></code></li><li><code class="module"><a href="./mod/mod_log_config.html">mod_log_config</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_authz_host.html#allow">Allow</a></code></li><li><code class="directive"><a href="./mod/mod_log_config.html#customlog">CustomLog</a></code></li><li><code class="directive"><a href="./mod/mod_authz_host.html#deny">Deny</a></code></li><li><code class="directive"><a href="./mod/mod_ext_filter.html#extfilterdefine">ExtFilterDefine</a></code></li><li><code class="directive"><a href="./mod/mod_headers.html#header">Header</a></code></li><li><code class="directive"><a href="./mod/mod_log_config.html#logformat">LogFormat</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li></ul></td></tr></table> <h3><a name="cgi-scripts" id="cgi-scripts">CGI スクリプト</a></h3> <p>環境変数の主な利用法の一つは、CGI スクリプトに情報を伝えることです。 上で説明されているように、CGI スクリプトに渡される環境変数は Apache の設定により設定される変数に加えて、リクエストの標準のメタ情報を含んでいます。 詳細は <a href="howto/cgi.html">CGI チュートリアル</a> を参照してください。</p> <h3><a name="ssi-pages" id="ssi-pages">SSI ページ</a></h3> <p>mod_include の <code>INCLUDES</code> フィルタで処理される server-parsed (SSI) ドキュメントでは、<code>echo</code> 要素を使用すると環境変数が出力されます。 また、ページのある部分がリクエストの性質に応じて変更されるように、 環境変数をフロー制御要素で使うことができます。詳細は <a href="howto/ssi.html">SSI チュートリアル</a> を参照してください。</p> <h3><a name="access-control" id="access-control">アクセス制御</a></h3> <p><code>allow from env=</code> ディレクティブと <code>deny from env=</code> ディレクティブを使用して、サーバへのアクセスを環境変数の値で制御することができます。 <code class="directive"><a href="./mod/mod_setenvif.html#setenvif">SetEnvIf</a></code> ディレクティブと組み合わせることで、クライアントの特性に基づいて サーバへのアクセス制御を柔軟に行なうことができるようになります。 たとえば、これらのディレクティブを使用して、特定のブラウザ (User-Agent) からのアクセスを拒否することができます。</p> <h3><a name="logging" id="logging">条件付きログ記録</a></h3> <p><code class="directive"><a href="./mod/mod_log_config.html#logformat">LogFormat</a></code> ディレクティブのオプション <code>%e</code> を使用することで、環境変数をアクセスログに記録することができます。さらに、 <code class="directive"><a href="./mod/mod_log_config.html#customlog">CustomLog</a></code> ディレクティブの条件分岐式を使用することで、 環境変数の値によってリクエストをログに記録するかどうかを決めることができます。 <code class="directive"><a href="./mod/mod_setenvif.html#setenvif">SetEnvIf</a></code> ディレクティブと組み合わせることで、 どのリクエストをログに記録するかを柔軟に制御することが可能になります。たとえば、 <code>gif</code> で終わるファイル名へのリクエストはログに記録しない、 違うサブネットのクライアントからのリクエストだけをログに記録する、 という選択が可能です。</p> <h3><a name="response-headers" id="response-headers">条件付き応答ヘッダ</a></h3> <p><code class="directive"><a href="./mod/mod_headers.html#header">Header</a></code> ディレクティブは環境変数の存在や不在によってクライアントへの応答に特定の HTTP ヘッダを付けるかどうかを決めることができます。 これにより、たとえば、クライアントからのリクエスト にあるヘッダがある場合にのみ特定の応答ヘッダを送る、というようなことが できます。</p> <h3><a name="external-filter" id="external-filter">外部フィルタの適用</a></h3> <p><code class="directive"><a href="./mod/mod_ext_filter.html#extfilterdefine">ExtFilterDefine</a></code> ディレクティブを使用して <code class="module"><a href="./mod/mod_ext_filter.html">mod_ext_filter</a></code> で設定される外部フィルタは、 <code>disableenv=</code> と <code>enableenv=</code> オプションを使って、環境変数による条件付き適用ができます。</p> <h3><a name="url-rewriting" id="url-rewriting">URL の書き換え</a></h3> <p><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code> ディレクティブで<em>評価文字列</em>として <code>%{ENV:...}</code> 式を指定することで、mod_rewrite の書き換えエンジンが環境変数に基いて条件分岐を行なうことができます。 mod_rewrite が使用可能な変数で <code>ENV:</code> が前についていない変数は、 実際は環境変数ではないということに注意してください。 それらは他のモジュールからは使用できない mod_rewrite 用の特別な変数です。 </p> </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> <div class="section"> <h2><a name="special" id="special">特別な目的の環境変数</a></h2> <p>互換性の問題を解決するために、特定のクライアントと通信しているときは Apache の動作を変更できる機構が導入されました。できるだけ柔軟にするために、 これらの機構は環境変数を定義することで呼び出されます。普通は、 <code class="directive"><a href="./mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code> ディレクティブを使いますが、たとえば <code class="directive"><a href="./mod/mod_env.html#setenv">SetEnv</a></code> ディレクティブや <code class="directive"><a href="./mod/mod_env.html#passenv">PassEnv</a></code> ディレクティブも使用することができます。</p> <h3><a name="downgrade" id="downgrade">downgrade-1.0</a></h3> <p>これを指定することで、リクエストが HTTP/1.0 より新しいプロトコルの場合でも、HTTP/1.0 として扱われます。</p> <h3><a name="force-gzip" id="force-gzip">force-gzip</a></h3> <p><code>DEFLATE</code> フィルタが使用するように設定されているときに、 この環境変数はブラウザの accept-encoding の設定を無視して常に 圧縮された出力を送るようにします。</p> <h3><a name="force-no-vary" id="force-no-vary">force-no-vary</a></h3> <p>応答ヘッダがクライアントに送られる前に <code>Vary</code> フィールドを取り除きます。 クライアントの中にはこのフィールドを正しく解釈しないものがあります。 この変数を設定することでその問題を回避することができます。 この変数を設定すると、<strong>force-response-1.0</strong> が設定されたことになります。</p> <h3><a name="force-response" id="force-response">force-response-1.0</a></h3> <p>これが設定されていると、HTTP/1.0 リクエストを発行するクライアントに対しては 常に HTTP/1.0 で応答するようになります。この機能は、 元々は AOL のプロキシの問題のために実装されました。HTTP/1.0 クライアントの中には、 HTTP/1.1 の応答を返されると正しく動作しないものがあるかもしれません。 この機能を使用することで、そのようなクライアントとの間の互換性問題を解決できます。</p> <h3><a name="gzip-only-text-html" id="gzip-only-text-html">gzip-only-text/html</a></h3> <p>これが 1 に設定されると、この変数は <code>text/html</code> 以外のコンテントタイプに対する、<code class="module"><a href="./mod/mod_deflate.html">mod_deflate</a></code> 提供の <code>DEFLATE</code> 出力フィルタを無効にします。 また、静的に、既に圧縮されたファイルを使用したい場合、 (gzip だけでなく、"identity" と異なる全てのエンコードに対して) <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> も変数を評価します。</p> <h3><a name="no-gzip" id="no-gzip">no-gzip</a></h3> <p>セットされると、<code class="module"><a href="./mod/mod_deflate.html">mod_deflate</a></code> の <code>DEFLATE</code> フィルタがオフになります。 そして <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> はエンコードされたリソースを送らないようにします。</p> <h3><a name="nokeepalive" id="nokeepalive">nokeepalive</a></h3> <p>これが設定されている場合は、<code class="directive"><a href="./mod/core.html#keepalive">KeepAlive</a></code> を使用しないようにします。</p> <h4><a name="prefer-language" id="prefer-language">prefer-language</a></h4> <p><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> の挙動に影響を与えます。 (<code>en</code>, <code>ja</code>, <code>x-klingon</code>といった) 言語タグが格納されていれば、その言語の variant を送信しようとします。 そのような variant がない場合は、 通常の<a href="content-negotiation.html">ネゴシエーション</a>処理が 適用されます。</p> <h3><a name="redirect-carefully" id="redirect-carefully">redirect-carefully</a></h3> <p>これはクライアントへのリダイレクトの送信をサーバがより注意深く 行なうようにします。 これは通常、リダイレクトに際してクライアントに 問題があることが分かっている場合に使われます。この機能は元々は マイクロソフトのウェブフォルダのソフトが DAV メソッドによるディレクトリのリソースへのリダイレクトの扱いに 問題がり、それを回避するために実装されました。</p> <h3><a name="suppress-error-charset" id="suppress-error-charset">suppress-error-charset</a></h3> <p><em>Apache 2.2 以降で利用可能</em></p> <p>クライアントのリクエストに対する応答としてリダイレクトを送信する際、 レスポンスにはリダイレクトが自動的に行なえない (行なわれない) 場合に表示するテキストが含まれます。 通常、このテキストに合致したキャラクタセット、ISO-8859-1 でラベル付けをします。</p> <p>しかし、リダイレクト先が別の文字セットを使っている場合、 ある問題のあるブラウザのバージョンでは、 リダイレクト先の実際の文字セットの代わりに、 リダイレクト元の文字セットを使ってしまうことがあります。 その結果、例えば変な描画が行なわれたりして、読めなくなったりします。</p> <p>この環境変数を設定することで、リダイレクションテキストに対する キャラクタセットの指定を除去しますので、それら問題のあるブラウザでも リダイレクト先の文字セットを正しく使うようにできます。</p> <div class="warning"> <h3>セキュリティ</h3> <p>文字セットを指定せずにエラーページを送信すると、 クロスサイトスクリプティング <span class="transnote">(<em>訳注:</em> XSS)</span> 攻撃の危険性がでてきます。 HTTP/1.1 仕様に準拠していなくて、コンテンツの中身から文字セットを "推測" しようとするブラウザ (MSIE) が実際にあるからです。 そのようなブラウザは UTF-7 文字セットを使って簡単に騙すことができます。 クロスサイトスクリプティング攻撃を防ぐために実装されている 通常のエスケープ機構が、入力データ中にある UTF-7 で エンコードされたコンテンツ (リクエスト URI など) には うまく動作しないからです。</p> </div> <h3><a name="proxy" id="proxy">force-proxy-request-1.0, proxy-nokeepalive, proxy-sendchunked, proxy-sendcl</a></h3> <p>これらの指示子は <code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code> の挙動を変更します。 詳細は <code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code> のドキュメントをご参照ください。</p> </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> <div class="section"> <h2><a name="examples" id="examples">例</a></h2> <h3><a name="misbehaving" id="misbehaving">おかしな挙動をするクライアントに対してプロトコルの動作を変更する</a></h3> <p>クライアントに関する既知の問題に対処するために、以下の行を httpd.conf に入れることを推奨しています。</p> <p>古いバージョンの Apache では、クライアントの問題に対応するために httpd.conf に次の行を加えるよう推奨されていましたが、 今となっては、問題としていたクライアントは実際には見かけることは なくなってきたので、この設定はもはや必要ないかもしれません。</p> <div class="example"><pre># # The following directives modify normal HTTP response behavior. # The first directive disables keepalive for Netscape 2.x and browsers that # spoof it. There are known problems with these browser implementations. # The second directive is for Microsoft Internet Explorer 4.0b2 # which has a broken HTTP/1.1 implementation and does not properly # support keepalive when it is used on 301 or 302 (redirect) responses. # BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 # # The following directive disables HTTP/1.1 responses to browsers which # are in violation of the HTTP/1.0 spec by not being able to grok a # basic 1.1 response. # BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0</pre></div> <h3><a name="no-img-log" id="no-img-log">画像へのリクエストをアクセスログに記録しない</a></h3> <p>この例では、画像へのリクエストがアクセスログに現れないようにします。 これを変更することで、特定のディレクトリのログ収集をやめたり、 特定のホストからのリクエストのログ収集をやめたりすることが簡単にできます。 </p> <div class="example"><pre>SetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request CustomLog logs/access_log common env=!image-request</pre></div> <h3><a name="image-theft" id="image-theft">「画像の盗用」を防ぐ</a></h3> <p>この例は、別のサーバにいる人が、あなたのサーバにある画像を inline 画像として使用することを防ぎます。 これは推奨されている設定ではありませんが、ある限定された状況では有効です。 ここでは、すべての画像は <code>/web/images</code> というディレクトリにあると仮定します。</p> <div class="example"><pre>SetEnvIf Referer "^http://www\.example\.com/" local_referal # Allow browsers that do not send Referer info SetEnvIf Referer "^$" local_referal <Directory /web/images> Order Deny,Allow Deny from all Allow from env=local_referal </Directory></pre></div> <p>この手法に関する詳しい情報は ServerWatch にあるチュートリアル 「<a href="http://www.serverwatch.com/tutorials/article.php/1132731">Keeping Your Images from Adorning Other Sites</a> 」を参照してください。</p> </div></div> <div class="bottomlang"> <p><span>翻訳済み言語: </span><a href="./en/env.html" hreflang="en" rel="alternate" title="English"> en </a> | <a href="./fr/env.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | <a href="./ja/env.html" title="Japanese"> ja </a> | <a href="./ko/env.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | <a href="./tr/env.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> </div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> <script type="text/javascript"><!--//--><![CDATA[//><!-- var comments_shortname = 'httpd'; var comments_identifier = 'http://httpd.apache.org/docs/2.4/env.html'; (function(w, d) { if (w.location.hostname.toLowerCase() == "httpd.apache.org") { d.write('<div id="comments_thread"><\/div>'); var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); } else { d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); } })(window, document); //--><!]]></script></div><div id="footer"> <p class="apache">Copyright 2023 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> <p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- if (typeof(prettyPrint) !== 'undefined') { prettyPrint(); } //--><!]]></script> </body></html>
Close