【问题标题】:Install nginx module on AWS elastic beanstalk在 AWS 弹性 beantalk 上安装 nginx 模块
【发布时间】:2016-01-30 01:12:19
【问题描述】:
我想在我的弹性 beanstalk 实例上使用 ngx_http_realip_module,但它不符合 nginx 的标准,因此必须使用 --with-http_realip_module 配置参数启用它,但我似乎找不到任何 AWS 文档指导您如何执行此操作。
如何强制弹性 beanstalk 安装 nginx 并启用 realip?
【问题讨论】:
标签:
amazon-web-services
nginx
configuration
amazon-elastic-beanstalk
【解决方案1】:
您确定它尚未配置它吗?当我在我的 EB 实例上运行 nginx -V 时,我确实看到包含该模块:
$ nginx -V
nginx version: nginx/1.8.0
built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)
built with OpenSSL 1.0.1k-fips 8 Jan 2015
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-pcre --with-pcre-jit --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ld-opt=' -Wl,-E'
如果您向右滚动,您会看到 --with-http_realip_module 已配置。
我没有以任何方式测试过该模块。我只是指出标志已设置。