Answer the question
In order to leave comments, you need to log in
How to add upstream module to nginx?
os: Ubuntu 16.04
nginx version: nginx/1.12.2
configure arguments:
--with-cc-opt=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2
--with-ld -opt=-Wl,-z,relro -Wl,-z,now
--prefix=/usr/share/nginx
--conf-path=/etc/nginx/nginx.conf
--http-log-path=/ var/log/nginx/access.log
--error-log-path=/var/log/nginx/error.log
--lock-path=/var/lock/nginx.lock
--pid-path=/run/ nginx.pid
--modules-path=/usr/lib/nginx/modules
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/ lib/nginx/fastcgi
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--with-debug
--with-pcre-jit
--with-http_ssl_module
--with-http_stub_status_module
--with-http_realip_module
--with-http_auth_request_module
--with-http_v2_module
--with-http_dav_module
--with-file-aio
--with-threads
--with-http_addition_module
--with-http_geoip_module=dynamic
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_image_filter_module= dynamic
--with-http_secure_link_module
--with-http_sub_module
--with-http_xslt_module=dynamic
--with-stream=dynamic
--with-stream_realip_module
--with-stream_geoip_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
--with-mail=dynamic
--with-mail_ssl_module --add
-dynamic-module=/usr/src/builddir/debian/modules/nginx-auth- pam --add
-module=/usr/src/builddir/debian/modules/nginx-dav-ext-module
--add-module=/usr/src/builddir/debian/modules/nginx-echo
--add-module =/usr/src/builddir/debian/modules/nginx-upstream-fair
--add-module=/usr/src/builddir/debian/modules/ngx_http_substitutions_filter_module
--add-module=/usr/src/builddir/debian/ modules/nginx-cache-purge
Server settings
upstream backend {
server 127.0.0.1:2;
server 127.0.0.1:3;
server 127.0.0.1:4;
}
server
{
server_name ******.ru;
root /var/www/******.ru/public;
index index.php index.html index.htm;
access_log /var/www/******.ru/logs/nginx.access.log;
error_log /var/www/******.ru/logs/nginx.errors.log;
location / {
proxy_pass http://backend/;
}
}
sleep(30)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question