●メイン設定ファイル
# vi /etc/nginx/nginx.conf
proxy_cache_path /var/cache/nginx keys_zone=zone1:1m max_size=100m inactive=24h;
server {
location / {
proxy_pass https://localhost:443;
proxy_cache_key "scheme$proxy_host$uri$is_args$args";
proxy_temp_path /var/cache/nginx_tmp;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
}
●デフォルトサーバの設定ファイル(デフォルト値が設定されるファイル)
# vi /etc/nginx/conf.d/default.conf
●設定ファイルの構文チェック
[root@ora12ee01 nginx]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful