ELIXIR MOBILE GATEWAY EXTREME ・ ELIXIR UNIVERSALの
エリクサー設定項目とエリクサー設定に使用されている変数の一覧及びその内容です。
※その他のNginxの設定については、
"NginxModules" をご参照ください。
| 設定項目名 | 設定項目の内容 |
|---|---|
| set_md5 |
設定項目の説明: 構文: set_md5 var_name value 初期値: なし 場所: server,location,if in location
例: set_md5 $var "$uri$is_args$args"; 説明: 変数$uriと$argsのMD5値をリクエスト毎に変数$varにセットする |
| elx_subreq |
設定項目の説明: 構文: elx_subreq [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_subreq on; 説明: 外部CSSの読み込みを可能にする 備考: nginxのssiと同じ |
| elx_subreq_types |
設定項目の説明: 構文: elx_subreq_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml text/css 場所: http,server,location
例: elx_subreq_types text/html text/css; 説明: Content-Typeがtext/html text/cssのときのみ外部CSSの読み込み処理を行う。 |
| xslt_types |
設定項目の説明: 構文: xslt_types mime-type [mime-type...] 初期値: text/xml 場所: http,server,location
例: xslt_types text/html application/xhtml+xml; 説明: text/html application/xhtml+xmlに対してのみXSLT処理を行う 備考: デフォルト設定ではHTML/XHTMLファイルは処理されない |
| xslt_stylesheet |
設定項目の説明: 構文: xslt_stylesheet template [parameter[[ parameter... ]] 初期値: なし 場所: location
例: xslt_stylesheet '/usr/local/xslt/special.xsl'; 説明: /usr/local/xslt/special.xslをXSLTファイルとして追加する 備考:
複数ある場合、設定ファイル中の上から下に向って処理を行う。
最初のリクエスト時にXSLT処理エラー(500 Internal Server Error)となったユーザXSLTは、
二回目以降のアクセスではエラーとなったXSLTは処理されない。
|
| xml_encoding_alias |
設定項目の説明: 構文: xml_encoding_alias encoding_name aliased_encoding_name 初期値: なし 場所: http
例: xml_encoding_alias CP932 Shift_JIS; 説明: XSLT処理時にShift_JISをCP932として扱う 備考: xml_encoding_alias CP932 Shift_JIS;を推奨 |
| xslt_ext_stylesheet |
設定項目の説明: 構文: xslt_ext_stylesheet template [parameter[[ parameter... ]] 初期値: なし 場所: location
例: xslt_ext_stylesheet '/usr/local/xslt/user-$elx_carrier.xsl'; 説明: /usr/local/xslt/user-$elx_carrier.xslをユーザXSLTとして処理を行う 備考:
変数がある場合はアクセス毎に変数を展開してからXSLTファイル名として処理を行う。
変数名を含んだファイル名が指定された場合は、xslt_stylesheetのXSLT処理の前に処理する。
変数名を含まないファイル名が指定された場合は、xslt_stylesheetも含めて設定ファイル中の
上から下に向って処理を行う。
複数ある場合、変数名を含んだもの含まないものにグループ分けして、
設定ファイル中の上から下に向って処理を行う。
最初のリクエスト時にXSLT処理エラー(500 Internal Server Error)となったユーザXSLTは、
二回目以降のアクセスではエラーとなったXSLTは処理されない。
|
| elx_add_variable |
設定項目の説明: 構文: elx_add_variable var_name xpath_expr 初期値: なし 場所: http,server,location
例: elx_add_variable "docomo_au" "\"($elx_carrier='docomo' or $elx_carrier='au')\""; 説明: domocoまたはauの場合にtrueとなる変数$docomo_auを定義する。 |
| elx_arrange |
設定項目の説明: 構文: elx_arrange [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_arrange on; 説明: キャッシュサイズに基く調整、mailtoの処理、javascript部分の削除、CSS部分の削除等を行う 注意事項: |
| elx_arrange_types |
設定項目の説明: 構文: elx_arrange_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml 場所: http,server,location
例: elx_arrange_types application/xhtml+xml; 説明: application/xhtml+xmlに対してのみページ全体の調整処理を行う |
| elx_arrange_margin |
設定項目の説明: 構文: elx_arrange_margin percentage 初期値: 0 場所: http,server,location,if in location
例: elx_arrange_margin 5; 説明: 端末キャッシュサイズを5%少いものとしてページ全体の調整処理を行う |
| elx_arrange_default_width |
設定項目の説明: 構文: elx_arrange_default_width pixel 初期値: 240 場所: http,server,location,if in location
例: elx_arrange_default_width 220; 説明: 画像計算時の想定幅を220ピクセルとする 備考: elx_arrange_default_width:elx_arrange_default_height=4:3が望ましい |
| elx_arrange_default_height |
設定項目の説明: 構文: elx_arrange_default_height pixel 初期値: 180 場所: http,server,location,if in location
例: elx_arrange_default_height 165; 説明: 画像計算時の想定高さを165ピクセルとする 備考: elx_arrange_default_width:elx_arrange_default_height=4:3が望ましい |
| elx_arrange_enforce_modify_width |
設定項目の説明: 構文: elx_arrange_enforce_modify_width [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_arrange_enforce_modify_width on; 説明: 画像に指定されている幅パラメータを強制的に調整する |
| elx_arrange_enforce_modify_size |
設定項目の説明: 構文: elx_arrange_enforce_modify_size [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_arrange_enforce_modify_size on; 説明: 画像に指定されているサイズパラメータを強制的に調整する |
| elx_arrange_modify_width_height_attr |
設定項目の説明: 構文: elx_arrange_modify_width_height_attr [on|off] 初期値: off 場所: http,server,location
例: elx_arrange_modify_width_height_attr on; 説明: imgタグのwidth/height属性値を強制的に調整する |
| elx_arrange_img_src_asis_attr |
設定項目の説明: 構文: elx_arrange_img_src_asis_attr attr_name 初期値: elx_asis 場所: http,server,location
例: elx_arrange_img_src_asis_attr "elx_analysis"; 説明: <img src="analysis.img-URI" elx_analysis="1"/>と指定されたタグを <img src="analysis.img-URI" border="0"/>で出力する。 注意事項: |
| elx_arrange_meta_refresh_status_code |
設定項目の説明: 構文: elx_arrange_meta_refresh_status_code [301|302] 初期値: 301 場所: http,server,location,if in location
例: elx_arrange_meta_refresh_status_code 301; 説明: HTTP Location:ヘッダによるリダイレクト時のHTTPステータスコードを301にする 備考: HTTPステータスコードは301(moved PERMANENTLY)または302(moved TEMPORARILY)のみ |
| elx_css_enable |
設定項目の説明: 構文: elx_css_enable [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_css_enable on; 説明: CSSに対する処理@import処理を行う 注意事項: |
| elx_css_types |
設定項目の説明: 構文: elx_css_types mime-type [mime-type...] 初期値: text/css 場所: http,server,location
例: elx_css_types text/css; 説明: |
| elx_css_translation_enable |
設定項目の説明: 構文: elx_css_translation_enable [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_css_translation_enable on; 説明: CSS変換処理を行なう。 |
| elx_css_ignore_error |
設定項目の説明: 構文: elx_css_ignore_error [on|off] 初期値: on 場所: http,server,location,if in location
例: elx_css_ignore_error off; 説明: CSSのエラーを無視しない 注意事項: |
| elx_css_import_enable |
設定項目の説明: 構文: elx_css_import_enable [on|off] 初期値: off 場所: http,server,location
例: elx_css_import_enable on; 説明: CSS @import処理を行う 注意事項: |
| elx_css_import_types |
設定項目の説明: 構文: elx_css_import_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml 場所: http,server,location
例: elx_css_import_types text/html application/xhtml+xml; 説明: text/html application/xhtml+xmlのコンテンツでstyleタグ中のCSS @import処理を行う |
| elx_css_inline_enable |
設定項目の説明: 構文: elx_css_inline_enable [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_css_inline_enable on; 説明: 外部CSS読み込み非対応機種の場合にCSSのinline展開処理を行う 備考: 外部CSS読み込み対応機種の場合は何も処理しない |
| elx_css_inline_types |
設定項目の説明: 構文: elx_css_inline_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml 場所: http,server,location
例: elx_css_inline_types text/html application/xhtml+xml; 説明: text/html application/xhtml+xmlのコンテンツでCSSのinline処理を行う |
| elx_emoji_filter |
設定項目の説明: 構文: elx_emoji_filter [on|off] 初期値: on 場所: http,server,location,if in location
例: elx_emoji_filter off; 説明: 絵文字変換処理を無効にする |
| elx_emoji_filter_strip_unknown |
設定項目の説明: 構文: elx_emoji_filter_strip_unknown [on|off] 初期値: on 場所: http,server,location
例: elx_emoji_filter_strip_unknown off; 説明: 無効な絵文字を削除しない |
| elx_emoji_filter_types |
設定項目の説明: 構文: elx_emoji_filter_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml 場所: http,server,location
例: elx_emoji_filter_types text/html application/xhtml+xml; 説明: text/html application/xhtml+xmlのコンテンツで絵文字変換処理を行う |
| elx_codeconv |
設定項目の説明: 構文: elx_codeconv [on|off] 初期値: on 場所: http,server,location,if in location
例: elx_codeconv on; 説明: 文字コード変換処理を有効にする 注意事項: 関連設定項目: elx_post_codeconv_charset |
| elx_codeconv_html_types |
設定項目の説明: 構文: elx_codeconv_html_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml 場所: http,server,location
例: elx_codeconv_html_types text/html application/xhtml+xml; 説明: text/html application/xhtml+xmlのコンテンツをHTML/XHTMLとして文字コード変換処理を行う |
| elx_codeconv_css_types |
設定項目の説明: 構文: elx_codeconv_css_types mime-type [mime-type...] 初期値: text/css 場所: http,server,location
例: elx_codeconv_css_types text/css; 説明: text/cssのコンテンツをCSSとして文字コード変換処理を行う |
| elx_codeconv_html_charset_regex |
設定項目の説明: 構文: elx_codeconv_html_charset_regex regex sub-no [regex sub-no...] 初期値: "<\?\s*xml[^>\?]+encoding\s*=\s*\"\s*([^\"\s]+)\s*\"[^>\?]*\?>" 1 "<\s*meta[^>]+content\s*=\s*\"[^\"]*charset\s*=\s*([^\"\s;]+)[\s;]*[^\"]*\"[^>]*>" 1 場所: http,server,location
例: elx_codeconv_html_charset_regex ''; 説明: HTML/XHTMLコンテンツの文字コード検出を行わない 備考:
文字コード判定の順位は、
1. Content-Type
2. elx_codeconv_html_charset_regex/elx_codeconv_css_charset_regex
3. 自動判定
4. elx_codeconv_html_default_encoding/elx_codeconv_xhtml_default_encoding/elx_codeconv_css_default_encoding
|
| elx_codeconv_css_charset_regex |
設定項目の説明: 構文: elx_codeconv_css_charset_regex regex sub-no [regex sub-no...] 初期値: "@charset\s*\"([^\"]+)\"\s*;" 1 場所: http,server,location
例: elx_codeconv_css_charset_regex ''; 説明: CSSコンテンツの文字コード検出を行わない 備考:
文字コード判定の順位は、
1. Content-Type
2. elx_codeconv_html_charset_regex/elx_codeconv_css_charset_regex
3. 自動判定
4. elx_codeconv_html_default_encoding/elx_codeconv_xhtml_default_encoding/elx_codeconv_css_default_encoding
|
| elx_codeconv_xhtml_regex |
設定項目の説明: 構文: elx_codeconv_xhtml_regex regex sub-no [regex sub-no...] 初期値: "<\?\s*(xml)[^>\?]*\?>" 1 "<!DOCTYPE[^>]+(xhtml)" 1 場所: http,server,location
例: elx_codeconv_xhtml_regex ''; 説明: XHTMLコンテンツの判断を行わない |
| elx_codeconv_html_default_encoding |
設定項目の説明: 構文: elx_codeconv_html_default_encoding encoding_name 初期値: shift_jis 場所: http,server,location
例: elx_codeconv_html_default_encoding euc-jp; 説明: HTMLコンテンツのデフォルト文字コードをEUC-JPとする 備考:
文字コード判定の順位は、
1. Content-Type
2. elx_codeconv_html_charset_regex/elx_codeconv_css_charset_regex
3. 自動判定
4. elx_codeconv_html_default_encoding/elx_codeconv_xhtml_default_encoding/elx_codeconv_css_default_encoding
|
| elx_codeconv_xhtml_default_encoding |
設定項目の説明: 構文: elx_codeconv_xhtml_default_encoding encoding_name 初期値: utf-8 場所: http,server,location
例: elx_codeconv_xhtml_default_encoding shift_jis; 説明: XHTMLコンテンツのデフォルト文字コードをShift_JISとする 備考:
文字コード判定の順位は、
1. Content-Type
2. elx_codeconv_html_charset_regex/elx_codeconv_css_charset_regex
3. 自動判定
4. elx_codeconv_html_default_encoding/elx_codeconv_xhtml_default_encoding/elx_codeconv_css_default_encoding
|
| elx_codeconv_css_default_encoding |
設定項目の説明: 構文: elx_codeconv_css_default_encoding encoding_name 初期値: utf-8 場所: http,server,location
例: elx_codeconv_css_default_encoding shift_jis; 説明: CSSコンテンツのデフォルト文字コードをShift_JISとする 備考:
文字コード判定の順位は、
1. Content-Type
2. elx_codeconv_html_charset_regex/elx_codeconv_css_charset_regex
3. 自動判定
4. elx_codeconv_html_default_encoding/elx_codeconv_xhtml_default_encoding/elx_codeconv_css_default_encoding
|
| elx_image_filter |
設定項目の説明: 構文: elx_image_filter [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_image_filter on; 説明: 画像変換処理を有効にする |
| elx_image_filter_noconv_param_name |
設定項目の説明: 構文: elx_image_filter_noconv_param_name param_name 初期値: elx_nc 場所: http,server,location
例: elx_image_filter_noconv_param_name elx_noconv; 説明: 画像変換を行わないURLパラメータをelx_noconvにする |
| elx_image_filter_width_param_name |
設定項目の説明: 構文: elx_image_filter_width_param_name param_name 初期値: elx_w 場所: http,server,location
例: elx_image_filter_width_param_name elx_width; 説明: 幅指定URLパラメータをelx_widthにする |
| elx_image_filter_size_param_name |
設定項目の説明: 構文: elx_image_filter_size_param_name param_name 初期値: elx_s 場所: http,server,location
例: elx_image_filter_size_param_name elx_size; 説明: サイズ指定URLパラメータをelx_sizeにする |
| elx_image_filter_wp_param_name |
設定項目の説明: 構文: elx_image_filter_wp_param_name param_name 初期値: elx_wp 場所: http,server,location
例: elx_image_filter_wp_param_name elx_wallpaper; 説明: 待ち受け画像変換指定URLパラメータをelx_wallpaperにする |
| elx_image_filter_wp_bg_color_param_name |
設定項目の説明: 構文: elx_image_filter_wp_bg_color_param_name param_name 初期値: elx_wp_bg 場所: http,server,location
例: elx_image_filter_wp_bg_color_param_name elx_wp_background; 説明: 待ち受け画像変換の背景色URLパラメータをelx_wp_backgroundにする |
| elx_image_filter_wp_bg_color_default |
設定項目の説明: 構文: elx_image_filter_wp_bg_color_default color 初期値: 000000 場所: http,server,location
例: elx_image_filter_wp_color_default 112233; 説明: 待ち受け画像変換のデフォルト背景色を#112233にする 備考: 先頭の「#」を除いたカラーコードを指定 |
| elx_image_filter_copyright_path |
設定項目の説明: 構文: elx_image_filter_copyright_path path 初期値: なし 場所: http,server,location
例: elx_image_filter_copyright_path /; 説明: 全ての画像に転送防止処理をする 備考: 以下の記述で転送防止画像埋め込みデータと送出HTTPヘッダの指定をすること
# XXX fixed value depends on nginx's 'map' directive variable name.
# first ']' is '$elx_image_copyright send as HTTP header' scheme ( MAGICK char ).
# header delimiter : %0a (\n)
map $elx_carrier $elx_image_copyright { # $elx_carrier depend on other config
docomo copy="NO";
au kddi_copyright=on;
softbank "]Cache-Control: no-store%0ax-jphone-copyright: no-store,no-transfer,no-peripheral";
... any other carrier
}
|
| elx_image_filter_copyright_comments |
設定項目の説明: 構文: elx_image_filter_copyright_comments comment [comment...] 初期値: なし 場所: http,server,location
例: elx_image_filter_copyright_comments copy="YES" kddi_copyright=on; 説明: 画像のコメントにcopy="YES"またはkddi_copyright=onが入っている場合送防止処理をする 備考:
元画像にこの設定で指定された転送防止コメントが入っている場合、
elx_image_filter_copyright_pathの設定に関らず、転送防止処理をする
|
| elx_image_filter_percent |
設定項目の説明: 構文: elx_image_filter_percent string 初期値: %P 場所: http,server,location
例: elx_image_filter_percent 'P'; 説明: パーセント指定を「P」文字のみにする 備考: 英字が指定された場合、大文字小文字を区別しない |
| elx_memcached |
設定項目の説明: 構文: elx_memcached [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_memcached on; 説明: メモリキャッシュを有効にする |
| elx_memcached_types |
設定項目の説明: 構文: elx_memcached_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml image/jpeg image/gif image/png text/css 場所: http,server,location
例: elx_memcached_types text/html application/xhtml+xml text/css; 説明: text/html application/xhtml+xml text/cssのコンテンツのみメモリキャッシュを行う |
| elx_memcached_valid_sec |
設定項目の説明: 構文: elx_memcached_valid_sec secods 初期値: 300 場所: http,server,location
例: elx_memcached_valid_sec 3600; 説明: デフォルトのメモリキャッシュの有効期限を3600秒にする 備考:
基本的にHTTPヘッダCache-Control: no-cacheやExpire:やコンテンツ中のmetaタグによる指定に従う。
上記ヘッダまたはmetaタグでの指定がない場合のみ有効
|
| elx_memcached_pass |
設定項目の説明: 構文: elx_memcached_pass upstream 初期値: なし 場所: location,if in location
例: elx_memcached_pass memcached_cluster; 説明: メモリキャッシュupstreamをmemcached_clusterにする 備考: 以下の様なupstreamの定義が必要。
upstream memcached_cluster {
memcached_hash;
server unix:/var/tmp/memcached.sock;
server 192.168.0.129:11211;
}
注意事項: |
| elx_mobile_profile |
設定項目の説明: 構文: elx_mobile_profile [on|off] 初期値: on 場所: http,server,location,if in location
例: elx_mobile_profile on; 説明: |
| elx_tidy_enable |
設定項目の説明: 構文: elx_tidy_enable [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_tidy_enable on; 説明: HTMLTidyフィルタを有効にする |
| elx_tidy_types |
設定項目の説明: 構文: elx_tidy_types mime-type [mime-type...] 初期値: text/html application/xhtml+xml 場所: http,server,location
例: elx_tidy_types text/html; 説明: text/htmlのコンテンツのみHTMLTidyフィルタを適応する |
| elx_tidy_report |
設定項目の説明: 構文: elx_tidy_report [on|off] 初期値: off 場所: http,server,location
例: elx_tidy_report on; 説明: HTMLTidyのエラー/warningメッセージをログに出力する 備考: error level warnで出力する |
| elx_uid_enable |
設定項目の説明: 構文: elx_uid_enable [on|off] 初期値: off 場所: http,server,location,if in location
例: elx_uid_enable on; 説明: UID処理を有効にする |
| keepalive |
設定項目の説明: 構文: keepalive max_connections 初期値: なし 場所: upstream
例:
upstream memd {
server 127.0.0.1:11211;
server 10.0.0.2:11211;
keepalive 10;
}
説明: upstream backendでconnection keep-aliveを10にする 備考: この設定がない場合はupstreamに対してconnection keep-aliveを使わない |
| memcached_hash |
設定項目の説明: 構文: memcached_hash [ketama] 初期値: hashを用いる 場所: upstream
例:
upstream memd {
memcached_hash ketama;
server 127.0.0.1:11211;
server 10.0.0.2:11211;
keepalive 10;
}
server {
location / {
set $memcached_prefix "$host:$server_port";
set_md5 $memcached_key "$uri$is_args$args";
memcached_pass memd;
}
....
}
説明: upstream memdへのキャッシュ時にketama consistent hashingを使う 注意事項: |
| elx_post_codeconv_charset |
設定項目の説明: 構文: elx_post_codeconv_charset [utf-8|shift_jis|euc-jp|...] 初期値: なし 場所: http,server,location,if in location
例: elx_post_codeconv_charset shift_jis; 説明: POSTデータ(application/x-www-form-urlencoded)の文字コードをShift_JISに変換する 備考: 実在する変換対象のlocationに設定する。初期状態では下記の箇所に記述する。
location / {
proxy_cache example.jp;
・・・
elx_emoji_filter off;
elx_codeconv off;
elx_post_codeconv_charset shift_jis;
}
注意事項: |
| 変数名 | 変数の内容 |
| elixir_version |
変数の説明: 具体例 例: 説明: 注意事項: |
| elx_product_name |
変数の説明: 具体例 例: 説明: 注意事項: |
| elx_config_version |
変数の説明: 具体例 例: 説明: 注意事項: |
| elx_profile_version |
変数の説明: 具体例 例: 説明: 注意事項: |
| elx_css_translate_version |
変数の説明: 具体例 例: 説明: 注意事項: |
| elx_uid |
変数の説明: 具体例 例: proxy_set_header X-ELX-UID $elx_uid; 説明: 注意事項: |
| elx_uid_var_names |
変数の説明: 具体例 例:
map $elx_carrier $elx_uid_var_names {
docomo 'arg_uid elx_uid_icc_tmp http_x_dcmguid'; # separated by space to be parsed
au 'http_x_up_subno';
softbank 'http_x_jphone_uid';
}
説明: 注意事項: |
| elx_uid_icc_tmp |
変数の説明: 具体例 例:
server {
set $elx_uid_icc_tmp "";
if ( $http_user_agent ~* "[^i]*icc(.{20})" ) { # should be in server context
set $elx_uid_icc_tmp $1;
}
....
}
説明: 注意事項: |
| memcached_namespace |
変数の説明: 具体例 例: set $memcached_namespace "$host:$server_port"; 説明: memcached_namespaceを"ホスト名:ポート番号"にする 注意事項: |