| 83行目: | 83行目: | ||
ダウンロードしたファイルを解凍する。<br> | ダウンロードしたファイルを解凍する。<br> | ||
tar xf openssl-<バージョン> | tar xf openssl-<バージョン> | ||
<br> | |||
もし、Digest認証モジュールを使用する場合、NginXのソースコードと一緒に配布されていないため、別途インストールする必要がある。<br> | |||
[https://github.com/atomx/nginx-http-auth-digest Digest認証モジュールのGithub]にアクセスして、ソースコードをダウンロードする。<br> | |||
ダウンロードしたファイルを解凍する。<br> | |||
tar xf nginx-http-auth-digest-<バージョン>.tar.gz | |||
cd nginx-http-auth-digest-<バージョン> | |||
<br> | |||
または、<code>git clone</code>コマンドを実行して、ソースコードをダウンロードする。<br> | |||
git clone https://github.com/atomx/nginx-http-auth-digest.git | |||
cd nginx-http-auth-digest | |||
<br> | <br> | ||
[https://nginx.org/en/download.html NginXの公式Webサイト]にアクセスして、NginXのソースコードをダウンロードする。<br> | [https://nginx.org/en/download.html NginXの公式Webサイト]にアクセスして、NginXのソースコードをダウンロードする。<br> | ||
| 90行目: | 100行目: | ||
<br> | <br> | ||
NginXをビルドおよびインストールする。<br> | NginXをビルドおよびインストールする。<br> | ||
<br> | |||
Digest認証モジュールも併せてビルドおよびインストールする場合、<br> | |||
<code>configure</code>スクリプトにおいて、<code>--add-module=<Digest認証モジュールのソースコードがあるディレクトリ></code>オプションを付加する。<br> | |||
<br> | |||
<u>NginXのビルドにおいて、ビルドディレクトリを作成すると失敗することに注意する。</u><br> | <u>NginXのビルドにおいて、ビルドディレクトリを作成すると失敗することに注意する。</u><br> | ||
export NGINX_DIR=<NginXのインストールディレクトリ> | export NGINX_DIR=<NginXのインストールディレクトリ> | ||
| 109行目: | 123行目: | ||
--with-perl_modules_path=$NGINX_DIR/Perl \ | --with-perl_modules_path=$NGINX_DIR/Perl \ | ||
--with-threads --with-file-aio --with-pcre --with-pcre-jit \ | --with-threads --with-file-aio --with-pcre --with-pcre-jit \ | ||
--with-http_v2_module --with-http_ssl_module --with-http_addition_module --with-http_realip_module \ | --with-http_v2_module --with-http_ssl_module --with-http_addition_module --with-http_realip_module --with-http_flv_module \ | ||
--with-http_random_index_module --with-http_degradation_module --with-http_slice_module --with-http_dav_module --with-http_mp4_module \ | |||
--with-http_xslt_module --with-http_xslt_module=dynamic \ | --with-http_xslt_module --with-http_xslt_module=dynamic \ | ||
--with-http_image_filter_module --with-http_image_filter_module=dynamic | --with-http_image_filter_module --with-http_image_filter_module=dynamic \ | ||
--with-http_gunzip_module --with-http_gzip_static_module | --with-http_gunzip_module --with-http_gzip_static_module \ | ||
--with-http_auth_request_module --with-http_secure_link_module --with-http_stub_status_module --with-http_sub_module \ | --with-http_auth_request_module --with-http_secure_link_module --with-http_stub_status_module --with-http_sub_module \ | ||
--with-http_perl_module --with-http_perl_module=dynamic \ | --with-http_perl_module --with-http_perl_module=dynamic \ | ||
| 118行目: | 133行目: | ||
--with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module \ | --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module \ | ||
--with-compat \ | --with-compat \ | ||
--user=<任意のユーザ名 例. nginx> \ | |||
--user=<任意のユーザ名 | --group=<任意のグループ名 例. nginx> | ||
--group=<任意のグループ名 | |||
# 不要の可能性あり | # 不要の可能性あり | ||
--without-poll_module --without-select_module --with-ipv6 | --without-poll_module --without-select_module --with-ipv6 | ||
# Digest認証を使用する場合 | |||
--add-module=<Digest認証モジュールのソースコードがあるディレクトリ> | |||
# GCCコンパイラを指定する場合 | |||
--with-cc=/<gcc実行ファイルがあるディレクトリ>/gcc \ | |||
--with-cpp=/<g++実行ファイルがあるディレクトリ>/g++ | |||
# OpenSSLを手動で設定する場合に記述する | # OpenSSLを手動で設定する場合に記述する | ||
--with-openssl=<上記でダウンロードおよび解凍したOpenSSLのソースコードのトップディレクトリ> | --with-openssl=<上記でダウンロードおよび解凍したOpenSSLのソースコードのトップディレクトリ> | ||
# 以下の設定はAIOを使用する場合に記述する | # 以下の設定はAIOを使用する場合に記述する | ||
--with-cc-opt='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchron ous-unwind-tables -fstack-clash-protection -g -fPIC -D_GNU_SOURCE' \ | --with-cc-opt='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchron ous-unwind-tables -fstack-clash-protection -g -fPIC -D_GNU_SOURCE' \ | ||