Giter VIP home page Giter VIP logo

openbridge / nginx Goto Github PK

View Code? Open in Web Editor NEW
225.0 13.0 50.0 145.5 MB

NGINX Accelerated! This is a Docker image that creates a high performance (FAST!), optimized image for NGINX for use with Redis and PHP-FMP. Deliver sites and applications with performance, reliability, security, and scale. This NGINX server offers advanced performance, web and mobile acceleration, security controls, application monitoring, and management.

Home Page: https://www.openbridge.com/

License: MIT License

Shell 15.47% HTML 35.23% PHP 43.97% Dockerfile 5.33%
nginx nginx-proxy nginx-docker nginx-php-fpm nginx-configuration redis php-fpm nginx-server reverse-proxy redis-cache

nginx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx's Issues

Help with a version to use with Prestashop 1.7+

Hi i have more or less a week trying to get Docker to work with Nginx Php-fpm an mariadb locally to use it with Prestashop 1.7
when i found your repo, it just took me half night to run it.
the problem is that to make it work, i had to chance many conf files and i think that i disable redis
i have no idea how to check it or if i mess up something, so can you help me checking?.

Prestashop 1.7 only runs with PHP 7.2 max, so i took you Docker php-fpm file and did this to build a new image:

`FROM php:7.2-fpm-alpine3.9

ENV VAR_PREFIX=/var/run
ENV LOG_PREFIX=/var/log/php-fpm
ENV TEMP_PREFIX=/tmp
ENV CACHE_PREFIX=/var/cache

RUN set -x
&& apk add --no-cache --virtual .build-deps
wget
linux-headers
curl
unzip
&& echo '@community http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories
&& apk add --no-cache --update
php7-dev@community
php7-bcmath@community
php7-dom@community
php7-common@community
php7-ctype@community
php7-cli@community
php7-curl@community
php7-fileinfo@community
php7-fpm@community
php7-gettext@community
php7-gd@community
php7-iconv@community
php7-json@community
php7-mbstring@community
php7-mcrypt@community
php7-mysqli@community
php7-mysqlnd@community
php7-opcache@community
php7-odbc@community
php7-pdo@community
php7-pdo_mysql@community
php7-pdo_pgsql@community
php7-pdo_sqlite@community
php7-phar@community
php7-posix@community
php7-redis@community
php7-session@community
php7-simplexml@community
php7-soap@community
php7-tokenizer@community
php7-xml@community
php7-xmlreader@community
php7-xmlwriter@community
php7-simplexml@community
php7-zip@community
php7-zlib@community
php7-intl
mysql-client
curl
monit
bash
xz
openssl
icu-libs
ca-certificates
libxml2-dev
tar
&& mkdir -p /var/run
&& mkdir -p ${LOG_PREFIX}
&& rm -rf /tmp/*
&& rm -rf /var/cache/apk/*
&& touch ${LOG_PREFIX}/access.log
&& touch ${LOG_PREFIX}/error.log
&& ln -sf /dev/stdout ${LOG_PREFIX}/access.log
&& ln -sf /dev/stderr ${LOG_PREFIX}/error.log

COPY conf/monit/ /etc/monit.d/
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY check_wwwdata.sh /usr/bin/check_wwwdata
COPY check_folder.sh /usr/bin/check_folder

EXPOSE 9000

RUN chmod +x /docker-entrypoint.sh /usr/bin/check_wwwdata /usr/bin/check_folder

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["php-fpm7", "-g", "/var/run/php-fpm.pid"]`

then i had to change the nginx secure.conf nginx.conf location.conf as the folders are different to WP, here is the PS official Nginx config https://github.com/PrestaShop/PrestaShop/blob/develop/docs/server_config/nginx.conf.dist

I think i mess up on the default.vhost as i had to change the location / to this

location / { error_page 502 =200 @failed; try_files $uri $uri/ /index.php?$args; if (!-e $request_filename) { rewrite ^/.*$ /index.php last; } } include /etc/nginx/conf.d/location.conf; include /etc/nginx/redis.d/location.conf;
taking out the proxy (if i live it, the admin panel does not work)

also i did change the location .php in location.conf as when i was getting into the web page it was downloading the php file instead of ruing it.

`location ~ [^/].php(/|$)
{
try_files $fastcgi_script_name /index.php$uri&$args @php-fpm;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass php-fpm;
include /etc/nginx/fastcgi.d/fastcgi.conf;
include /etc/nginx/redis.d/cache.conf;
}
location ~* .(jpg|jpeg|png|gif|ico|css|js|woff(?:2)?)$ {
expires 365d;
}
location ~* .(css|js)$ {
expires 7d;
}

    location = /favicon.ico {
        auth_basic off;
        allow all;
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        auth_basic off;
        allow all;
        log_not_found off;
        access_log off;
    }

    # Images
    rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last;
    rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last;
    rewrite ^/c/([0-9]+)(-[.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+.jpg$ /img/c/$1$2$3.jpg last;
    rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+.jpg$ /img/c/$1$2.jpg last;
    rewrite ^/[a-zA-Z][a-zA-Z]/index.php(.*)$ /index.php$1;
    try_files $uri $uri/ /index.php?$args;


    # AlphaImageLoader for IE and fancybox
    rewrite ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 last;

    # Web service API
    rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;

`
so at the end i am not sure of what i have done, if you can help me it will be fantastic!, thank you

What was the reasoning for adding $msec to WP CSS/JS files?

In secure.conf you have this at the bottom of the file.

# Custom sub_filter for specific WordPress assets
location ~* ^/(license.txt|wp-includes/(.*)/.+\.(js|css)|wp-admin/(.*)/.+\.(js|css))$ {
    sub_filter_types text/css text/javascript text/plain;
    sub_filter_once on;
    sub_filter ';' '; /* $msec */ ';
}

Are you able to share your reasoning behind this please? Does it aid in security or is it just there for debugging reasons?

DockerFile error Step 6/16 : COPY conf/ /conf

hi,

It seems like there is an error in the docker file in the final steps, please see below.

Step 6/16 : COPY conf/ /conf
COPY failed: stat /var/lib/docker/tmp/docker-builder660373075/conf: no such file or directory

I tried to delete the lines:
COPY conf/ /conf
COPY test/ /tmp/test

but still failing to build. (Step 6/13 : COPY check_wwwdata.sh /usr/bin/check_wwwdata
COPY failed: stat /var/lib/docker/tmp/docker-builder849396188/check_wwwdata.sh: no such file or directory)

ngx_http_geoip_module.so

When I start the Docker image I get the following error message

nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_geoip_module.so" failed (Error loading shared library /etc/nginx/modules/ngx_http_geoip_module.so: No such file or directo
ry) in /etc/nginx/nginx.conf:1

Can you help me ?

Here is my creation-config

docker create
--name=openbridge
-v /share/Container_Data/openbridge/etc/nginx:/etc/nginx
-v /share/Container_Data/openbridge/usr/share/nginx/html:/usr/share/nginx/html
-v /share/Container_Data/openbridge/var/log/nginx:/var/log/nginx
-v /share/Container_Data/SSL/${NGINX_SERVER_NAME}/fullchain.pem:/etc/letsencrypt/live/${NGINX_SERVER_NAME}/fullchain.pem:ro
-v /share/Container_Data/SSL/${NGINX_SERVER_NAME}/privkey.pem:/etc/letsencrypt/live/${NGINX_SERVER_NAME}/privkey.pem:ro
-v /share/Container_Data/SSL/${NGINX_SERVER_NAME}/chain.pem:/etc/letsencrypt/live/${NGINX_SERVER_NAME}/chain.pem:ro
-p 9980:80 -p 9443:443
-e TZ=Europe/Berlin
-e NGINX_DOCROOT=/usr/share/nginx/html
-e NGINX_SERVER_NAME=top.secret.de
-e NGINX_CONFIG=php
-e NGINX_DEV_INSTALL=false
openbridge/nginx

monit always failed at 8080 port check

Describe the bug
When you run with the html config. monit will run conf/html/monit/check_nginx script to check upstream proxy port. Since the proxy is local to the container but monit run the check with NGINX_SERVER_NAME address. There is possibility that it will be failed.

To Reproduce

  1. Confirm the conf/html/monit/check_nginx
  2. You will see the command if failed port 8080 for 3 cycles then exec "/usr/bin/env bash -c '/usr/sbin/nginx -s stop'" (line 36)

Expected behavior
remove this line as it is supposed that 8080 port will always be locally opened. Therefore, not necessary to check this port.

Screenshots
The monit web interface show 8080 port check will always be failed.
Screen Shot 2020-04-14 at 13 44 41

multiple site setting at nginx env

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

if I want to run several web site service, How can I set the compose file and env file?

Normally I am using each pool config files in php-fpm folder and conf files in nginx at general case.

So, If you know How I can handle several files for nginx, I can manage it.

nginx cache logged users

Hello @tspicer

Please how can i prevent nginx for not cache page with users logged in because admin bar cache with page.

I use default openbridge/nginx configuration for nginx.

Can you help me fix it i would appreciate your help thank you.

WP configuration

By installing Wordpress and using ob_php-fpm container, i'm getting the mixed-content error over the entire site. How to correct this error?
Thank you in advance !

Nginx not found

Facing this error while deploying container

Nginx version not found.

`------------------------- Sun Jan 19 2020 13:53:20 GMT+0000 (Coordinated Universal Time)
Build started for dpboss
Step 1/16 : FROM alpine:3.10

---> 965ea09ff2eb
Step 2/16 : MAINTAINER Thomas Spicer ([email protected])

---> Using cache
---> 1360a1e29c04
Step 3/16 : ARG NGINX_VERSION

---> Using cache
---> 1177e845a059
Step 4/16 : ENV VAR_PREFIX=/var/run LOG_PREFIX=/var/log/nginx TEMP_PREFIX=/tmp CACHE_PREFIX=/var/cache CONF_PREFIX=/etc/nginx CERTS_PREFIX=/etc/pki/tls

---> Using cache
---> ec934255e800
Step 5/16 : RUN set -x && CONFIG=" --prefix=/usr/share/nginx/ --sbin-path=/usr/sbin/nginx --add-module=/tmp/naxsi/naxsi_src --modules-path=/usr/lib/nginx/modules --conf-path=${CONF_PREFIX}/nginx.conf --error-log-path=${LOG_PREFIX}/error.log --http-log-path=${LOG_PREFIX}/access.log --pid-path=${VAR_PREFIX}/nginx.pid --lock-path=${VAR_PREFIX}/nginx.lock --http-client-body-temp-path=${TEMP_PREFIX}/client_temp --http-proxy-temp-path=${TEMP_PREFIX}/proxy_temp --http-fastcgi-temp-path=${TEMP_PREFIX}/fastcgi_temp --http-uwsgi-temp-path=${TEMP_PREFIX}/uwsgi_temp --http-scgi-temp-path=${TEMP_PREFIX}/scgi_temp --user=www-data --group=www-data --with-http_ssl_module --with-pcre-jit --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --add-module=/tmp/ngx_cache_purge-2.3 --add-module=/tmp/ngx_http_redis-0.3.9 --add-module=/tmp/redis2-nginx-module-0.15 --add-module=/tmp/srcache-nginx-module-0.31 --add-module=/tmp/echo-nginx-module --add-module=/tmp/ngx_devel_kit-0.3.1 --add-module=/tmp/set-misc-nginx-module-0.32 --add-module=/tmp/ngx_brotli --with-cc-opt=-Wno-error " && addgroup -g 82 -S www-data && adduser -u 82 -D -S -h /var/cache/nginx -s /sbin/nologin -G www-data www-data && apk add --no-cache --virtual .build-deps build-base ca-certificates automake autoconf git libtool binutils gnupg cmake go gcc build-base libc-dev make wget gzip openssl-dev musl-dev pcre-dev zlib-dev geoip-dev git linux-headers gnupg libxslt-dev gd-dev unzip && apk add --no-cache --update curl monit wget bash bind-tools rsync geoip openssl tini tar && cd /tmp && git clone https://github.com/google/ngx_brotli --depth=1 && cd ngx_brotli && git submodule update --init && export NGX_BROTLI_STATIC_MODULE_ONLY=1 && cd /tmp && git clone https://github.com/nbs-system/naxsi.git && echo 'adding /usr/local/share/GeoIP/GeoIP.dat database' && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoLiteCity.dat.gz && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoIP.dat.gz && gzip -d GeoIP.dat.gz && gzip -d GeoLiteCity.dat.gz && mkdir /usr/local/share/GeoIP/ && mv GeoIP.dat /usr/local/share/GeoIP/ && mv GeoLiteCity.dat /usr/local/share/GeoIP/ && chown -R www-data:www-data /usr/local/share/GeoIP/ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz && mkdir -p /usr/src && tar -zxC /usr/src -f nginx.tar.gz && rm nginx.tar.gz && cd /tmp && git clone https://github.com/openresty/echo-nginx-module.git && wget https://github.com/simpl/ngx_devel_kit/archive/v0.3.1.zip -O dev.zip && wget https://github.com/openresty/set-misc-nginx-module/archive/v0.32.zip -O setmisc.zip && wget https://people.freebsd.org/~osa/ngx_http_redis-0.3.9.tar.gz && wget https://github.com/openresty/redis2-nginx-module/archive/v0.15.zip -O redis.zip && wget https://github.com/openresty/srcache-nginx-module/archive/v0.31.zip -O cache.zip && wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.zip -O purge.zip && tar -zx -f ngx_http_redis-0.3.9.tar.gz && unzip dev.zip && unzip setmisc.zip && unzip redis.zip && unzip cache.zip && unzip purge.zip && cd /usr/src/nginx-$NGINX_VERSION && ./configure $CONFIG --with-debug && make -j$(getconf _NPROCESSORS_ONLN) && mv objs/nginx objs/nginx-debug && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so && ./configure $CONFIG && make -j$(getconf _NPROCESSORS_ONLN) && make install && rm -rf /etc/nginx/html/ && mkdir /etc/nginx/conf.d/ && mkdir -p /usr/share/nginx/html/ && install -m644 html/index.html /usr/share/nginx/html/ && install -m644 html/50x.html /usr/share/nginx/html/ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules && strip /usr/sbin/nginx* && strip /usr/lib/nginx/modules/.so && mkdir -p /usr/local/bin/ && mkdir -p ${CACHE_PREFIX} && mkdir -p ${CERTS_PREFIX} && cd /etc/pki/tls/ && nice -n +5 openssl dhparam -out /etc/pki/tls/dhparam.pem.default 2048 && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/.so /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache --virtual .nginx-rundeps $runDeps && apk del .build-deps && apk del .gettext && cd /tmp/naxsi && mv naxsi_config/naxsi_core.rules /etc/nginx/naxsi_core.rules && mv /tmp/envsubst /usr/local/bin/ && rm -rf /tmp/* && rm -rf /usr/src/* && ln -sf /dev/stdout ${LOG_PREFIX}/access.log && ln -sf /dev/stderr ${LOG_PREFIX}/error.log && ln -sf /dev/stdout ${LOG_PREFIX}/blocked.log

---> Running in 6f129d2085b7

  • CONFIG=' --prefix=/usr/share/nginx/ --sbin-path=/usr/sbin/nginx --add-module=/tmp/naxsi/naxsi_src --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/tmp/client_temp --http-proxy-temp-path=/tmp/proxy_temp --http-fastcgi-temp-path=/tmp/fastcgi_temp --http-uwsgi-temp-path=/tmp/uwsgi_temp --http-scgi-temp-path=/tmp/scgi_temp --user=www-data --group=www-data --with-http_ssl_module --with-pcre-jit --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --add-module=/tmp/ngx_cache_purge-2.3 --add-module=/tmp/ngx_http_redis-0.3.9 --add-module=/tmp/redis2-nginx-module-0.15 --add-module=/tmp/srcache-nginx-module-0.31 --add-module=/tmp/echo-nginx-module --add-module=/tmp/ngx_devel_kit-0.3.1 --add-module=/tmp/set-misc-nginx-module-0.32 --add-module=/tmp/ngx_brotli --with-cc-opt=-Wno-error '

  • addgroup -g 82 -S www-data

  • adduser -u 82 -D -S -h /var/cache/nginx -s /sbin/nologin -G www-data www-data

  • apk add --no-cache --virtual .build-deps build-base ca-certificates automake autoconf git libtool binutils gnupg cmake go gcc build-base libc-dev make wget gzip openssl-dev
    musl-dev pcre-dev zlib-dev geoip-dev git linux-headers gnupg libxslt-dev gd-dev unzip

fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/100) Installing binutils (2.32-r0)
(2/100) Installing libmagic (5.37-r1)
(3/100) Installing file (5.37-r1)
(4/100) Installing gmp (6.1.2-r1)
(5/100) Installing isl (0.18-r0)
(6/100) Installing libgomp (8.3.0-r0)
(7/100) Installing libatomic (8.3.0-r0)
(8/100) Installing libgcc (8.3.0-r0)
(9/100) Installing mpfr3 (3.1.5-r1)
(10/100) Installing mpc1 (1.1.0-r0)
(11/100) Installing libstdc++ (8.3.0-r0)
(12/100) Installing gcc (8.3.0-r0)
(13/100) Installing musl-dev (1.1.22-r3)
(14/100) Installing libc-dev (0.7.1-r0)
(15/100) Installing g++ (8.3.0-r0)
[[ TRUNCATED ]]
(19/100) Upgrading libcrypto1.1 (1.1.1d-r0 -> 1.1.1d-r2)
(20/100) Installing ca-certificates (20190108-r0)
(21/100) Installing libbz2 (1.0.6-r7)
(22/100) Installing perl (5.28.2-r1)
(23/100) Installing automake (1.16.1-r0)
(24/100) Installing m4 (1.4.18-r1)
(25/100) Installing autoconf (2.69-r2)
(26/100) Installing nghttp2-libs (1.39.2-r0)
(27/100) Upgrading libssl1.1 (1.1.1d-r0 -> 1.1.1d-r2)
(28/100) Installing libcurl (7.66.0-r0)
(29/100) Installing expat (2.2.8-r0)
(30/100) Installing pcre2 (10.33-r0)
(31/100) Installing git (2.22.2-r0)
(32/100) Installing perl-error (0.17027-r0)
(33/100) Installing perl-git (2.22.2-r0)
(34/100) Installing git-perl (2.22.2-r0)
(35/100) Installing ncurses-terminfo-base (6.1_p20190518-r0)
(36/100) Installing ncurses-terminfo (6.1_p20190518-r0)
(37/100) Installing ncurses-libs (6.1_p20190518-r0)
(38/100) Installing readline (8.0.0-r0)
(39/100) Installing bash (5.0.0-r0)
Executing bash-5.0.0-r0.post-install
(40/100) Installing libltdl (2.4.6-r6)
(41/100) Installing libtool (2.4.6-r6)
(42/100) Installing libgpg-error (1.36-r2)
(43/100) Installing libassuan (2.5.3-r0)
(44/100) Installing libcap (2.27-r0)
(45/100) Installing libffi (3.2.1-r6)
(46/100) Installing libintl (0.19.8.1-r4)
(47/100) Installing libuuid (2.33.2-r0)
(48/100) Installing libblkid (2.33.2-r0)
(49/100) Installing libmount (2.33.2-r0)
(50/100) Installing pcre (8.43-r0)
(51/100) Installing glib (2.60.4-r0)
(52/100) Installing libgcrypt (1.8.5-r0)
(53/100) Installing libsecret (0.18.8-r0)
(54/100) Installing pinentry (1.1.0-r1)
Executing pinentry-1.1.0-r1.post-install
(55/100) Installing nettle (3.4.1-r1)
(56/100) Installing p11-kit (0.23.16.1-r0)
(57/100) Installing libtasn1 (4.14-r0)
(58/100) Installing libunistring (0.9.10-r0)
(59/100) Installing gnutls (3.6.8-r0)
(60/100) Installing libksba (1.3.5-r0)
(61/100) Installing db (5.3.28-r1)
(62/100) Installing libsasl (2.1.27-r4)
(63/100) Installing libldap (2.4.48-r0)
(64/100) Installing npth (1.6-r0)
(65/100) Installing sqlite-libs (3.28.0-r2)
(66/100) Installing gnupg (2.2.19-r0)
(67/100) Installing libacl (2.2.52-r6)
(68/100) Installing lz4-libs (1.9.1-r0)
(69/100) Installing xz-libs (5.2.4-r0)
(70/100) Installing libarchive (3.3.3-r1)
(71/100) Installing rhash-libs (1.3.8-r0)
(72/100) Installing libuv (1.29.1-r0)
(73/100) Installing cmake (3.14.5-r0)
(74/100) Installing cmake-bash-completion (3.14.5-r0)
(75/100) Installing go (1.12.12-r0)
(76/100) Installing wget (1.20.3-r0)
(77/100) Installing gzip (1.10-r0)
(78/100) Installing pkgconf (1.6.1-r1)
(79/100) Installing openssl-dev (1.1.1d-r2)
(80/100) Installing libpcre16 (8.43-r0)
(81/100) Installing libpcre32 (8.43-r0)
(82/100) Installing libpcrecpp (8.43-r0)
(83/100) Installing pcre-dev (8.43-r0)
(84/100) Installing zlib-dev (1.2.11-r1)
(85/100) Installing geoip (1.6.12-r1)
(86/100) Installing geoip-dev (1.6.12-r1)
(87/100) Installing linux-headers (4.19.36-r0)
(88/100) Installing libxml2 (2.9.9-r3)
(89/100) Installing libxslt (1.1.33-r3)
(90/100) Installing libxml2-dev (2.9.9-r3)
(91/100) Installing libxslt-dev (1.1.33-r3)
(92/100) Installing libpng (1.6.37-r1)
(93/100) Installing freetype (2.10.0-r0)
(94/100) Installing libjpeg-turbo (2.0.4-r0)
(95/100) Installing libwebp (1.0.2-r0)
(96/100) Installing libgd (2.2.5-r2)
(97/100) Installing gd (2.2.5-r2)
(98/100) Installing gd-dev (2.2.5-r2)
(99/100) Installing unzip (6.0-r4)
(100/100) Installing .build-deps (20200119.135335)
Executing busybox-1.30.1-r2.trigger
Executing ca-certificates-20190108-r0.trigger
OK: 611 MiB in 112 packages

  • apk add --no-cache --update curl monit wget bash bind-tools rsync geoip openssl tini tar

fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/20) Installing libevent (2.1.10-r0)
(2/20) Installing fstrm (0.5.0-r0)
(3/20) Installing krb5-conf (1.0-r1)
(4/20) Installing libcom_err (1.45.2-r1)
(5/20) Installing keyutils-libs (1.6-r1)
(6/20) Installing libverto (0.3.1-r0)
(7/20) Installing krb5-libs (1.17-r0)
(8/20) Installing json-c (0.13.1-r0)
(9/20) Installing protobuf (3.6.1-r1)
(10/20) Installing protobuf-c (1.3.0-r6)
(11/20) Installing bind-libs (9.14.8-r0)
(12/20) Installing bind-tools (9.14.8-r0)
(13/20) Installing curl (7.66.0-r0)
(14/20) Installing monit (5.25.3-r0)
(15/20) Installing openssl (1.1.1d-r2)
(16/20) Installing libattr (2.4.48-r0)
(17/20) Installing popt (1.16-r7)
(18/20) Installing rsync (3.1.3-r1)
(19/20) Installing tar (1.32-r0)
(20/20) Installing tini (0.18.0-r0)
Executing busybox-1.30.1-r2.trigger
OK: 624 MiB in 132 packages

Cloning into 'ngx_brotli'...

  • cd ngx_brotli
  • git submodule update --init

Submodule 'deps/brotli' (https://github.com/google/brotli.git) registered for path 'deps/brotli'

Cloning into '/tmp/ngx_brotli/deps/brotli'...

Submodule path 'deps/brotli': checked out 'd6d98957ca8ccb1ef45922e978bb10efca0ea541'

Cloning into 'naxsi'...

[[ TRUNCATED ]]
..........
......
.... 10% 8.46M 2s
1350K ....
...... ..
........ ........
.. .......... ....
...... 11% 12.0M 2s
1400K ..
........
.......... ......
.... .......... ..
........ 11% 11.9M 2s
1450K ........
.. .......... ....
...... ..........
........
.. 11% 9.12M 2s
1500K ......
.... ....
...... ..
........ ........
.. .......... 12% 14.9M 1s
1550K
....
...... ..........
.......... ......
.... .......... 12%
11.9M 1s
1600K ..
........ ........
.. .......... ....
...... .......... 12% 14.8M 1s

1650K .......... ......
.... ....
......
..
........ ........
.. 13% 7.49M 1s
1700K .......... ....
...... ..........
.......... ......
.... 13% 12.0M 1s
1750K .......... ..
........ ........
.. ......
.... ....
...... 14% 14.5M 1s
1800K ..........
.......... ......
.... .......... ..
........ 14% 9.48M 1s

1850K ........
.. .......... ....
...... ..........
.......... 14% 15.8M 1s
1900K ......
.... .......... ..
........ ........
.. .......... 15% 16.0M 1s
1950K ....
[[ TRUNCATED ]]
. .......... 60% 7.56M 0s
400K .....
..... .......... .
......... .......
... .......... 67% 7.66M 0s
450K ...
....... ...
....... .........
. .......... .....
..... 75% 6.37M 0s
500K .......... .
......... .......
... .......... ...
....... 82% 7.50M 0s
550K .........
. .......... .....
..... .......... .
......... 90% 10.7M 0s
600K
.......
... .......... ...
....... .........
. .......... 98% 7.54M 0s
650K .....
..... .. 100% 18.0M=0.1s

Last-modified header missing -- time-stamps turned off.
2020-01-19 13:53:51 (5.47 MB/s) - 'GeoIP.dat.gz' saved [678907/678907]

  • gzip -d GeoIP.dat.gz

  • gzip -d GeoLiteCity.dat.gz

  • mkdir /usr/local/share/GeoIP/

  • mv GeoIP.dat /usr/local/share/GeoIP/

  • mv GeoLiteCity.dat /usr/local/share/GeoIP/

  • chown -R www-data:www-data /usr/local/share/GeoIP/

  • curl -fSL http://nginx.org/download/nginx-.tar.gz -o nginx.tar.gz

    % Total % Received % Xferd Average Speed Time Time Time Current

                     Dload
    

U
plo
ad
To
ta
l

Sp
ent
Le
ft

Speed

0 0 0

0 0 0 0
0 --:--:-- --:--:
-- --:--:-- 0

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requ
ested UR
L returned error: 404 Not Found

{"code":22,"message":"The command '/bin/sh -c set -x && CONFIG=" --prefix=/usr/share/nginx/ --sbin-path=/usr/sbin/nginx --add-module=/tmp/naxsi/naxsi_src --modules-path=/usr/lib/nginx/modules --conf-path=${CONF_PREFIX}/nginx.conf --error-log-path=${LOG_PREFIX}/error.log --http-log-path=${LOG_PREFIX}/access.log --pid-path=${VAR_PREFIX}/nginx.pid --lock-path=${VAR_PREFIX}/nginx.lock --http-client-body-temp-path=${TEMP_PREFIX}/client_temp --http-proxy-temp-path=${TEMP_PREFIX}/proxy_temp --http-fastcgi-temp-path=${TEMP_PREFIX}/fastcgi_temp --http-uwsgi-temp-path=${TEMP_PREFIX}/uwsgi_temp --http-scgi-temp-path=${TEMP_PREFIX}/scgi_temp --user=www-data --group=www-data --with-http_ssl_module --with-pcre-jit --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --add-module=/tmp/ngx_cache_purge-2.3 --add-module=/tmp/ngx_http_redis-0.3.9 --add-module=/tmp/redis2-nginx-module-0.15 --add-module=/tmp/srcache-nginx-module-0.31 --add-module=/tmp/echo-nginx-module --add-module=/tmp/ngx_devel_kit-0.3.1 --add-module=/tmp/set-misc-nginx-module-0.32 --add-module=/tmp/ngx_brotli --with-cc-opt=-Wno-error " && addgroup -g 82 -S www-data && adduser -u 82 -D -S -h /var/cache/nginx -s /sbin/nologin -G www-data www-data && apk add --no-cache --virtual .build-deps build-base ca-certificates automake autoconf git libtool binutils gnupg cmake go gcc build-base libc-dev make wget gzip openssl-dev musl-dev pcre-dev zlib-dev geoip-dev git linux-headers gnupg libxslt-dev gd-dev unzip && apk add --no-cache --update curl monit wget bash bind-tools rsync geoip openssl tini tar && cd /tmp && git clone https://github.com/google/ngx_brotli --depth=1 && cd ngx_brotli && git submodule update --init && export NGX_BROTLI_STATIC_MODULE_ONLY=1 && cd /tmp && git clone https://github.com/nbs-system/naxsi.git && echo 'adding /usr/local/share/GeoIP/GeoIP.dat database' && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoLiteCity.dat.gz && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoIP.dat.gz && gzip -d GeoIP.dat.gz && gzip -d GeoLiteCity.dat.gz && mkdir /usr/local/share/GeoIP/ && mv GeoIP.dat /usr/local/share/GeoIP/ && mv GeoLiteCity.dat /usr/local/share/GeoIP/ && chown -R www-data:www-data /usr/local/share/GeoIP/ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz && mkdir -p /usr/src && tar -zxC /usr/src -f nginx.tar.gz && rm nginx.tar.gz && cd /tmp && git clone https://github.com/openresty/echo-nginx-module.git && wget https://github.com/simpl/ngx_devel_kit/archive/v0.3.1.zip -O dev.zip && wget https://github.com/openresty/set-misc-nginx-module/archive/v0.32.zip -O setmisc.zip && wget https://people.freebsd.org/~osa/ngx_http_redis-0.3.9.tar.gz && wget https://github.com/openresty/redis2-nginx-module/archive/v0.15.zip -O redis.zip && wget https://github.com/openresty/srcache-nginx-module/archive/v0.31.zip -O cache.zip && wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.zip -O purge.zip && tar -zx -f ngx_http_redis-0.3.9.tar.gz && unzip dev.zip && unzip setmisc.zip && unzip redis.zip && unzip cache.zip && unzip purge.zip && cd /usr/src/nginx-$NGINX_VERSION && ./configure $CONFIG --with-debug && make -j$(getconf _NPROCESSORS_ONLN) && mv objs/nginx objs/nginx-debug && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so && ./configure $CONFIG && make -j$(getconf _NPROCESSORS_ONLN) && make install && rm -rf /etc/nginx/html/ && mkdir /etc/nginx/conf.d/ && mkdir -p /usr/share/nginx/html/ && install -m644 html/index.html /usr/share/nginx/html/ && install -m644 html/50x.html /usr/share/nginx/html/ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules && strip /usr/sbin/nginx* && strip /usr/lib/nginx/modules/.so && mkdir -p /usr/local/bin/ && mkdir -p ${CACHE_PREFIX} && mkdir -p ${CERTS_PREFIX} && cd /etc/pki/tls/ && nice -n +5 openssl dhparam -out /etc/pki/tls/dhparam.pem.default 2048 && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/.so /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache --virtual .nginx-rundeps $runDeps && apk del .build-deps && apk del .gettext && cd /tmp/naxsi && mv naxsi_config/naxsi_core.rules /etc/nginx/naxsi_core.rules && mv /tmp/envsubst /usr/local/bin/ && rm -rf /tmp/* && rm -rf /usr/src/* && ln -sf /dev/stdout ${LOG_PREFIX}/access.log && ln -sf /dev/stderr ${LOG_PREFIX}/error.log && ln -sf /dev/stdout ${LOG_PREFIX}/blocked.log' returned a non-zero code: 22"}
The command '/bin/sh -c set -x && CONFIG=" --prefix=/usr/share/nginx/ --sbin-path=/usr/sbin/nginx --add-module=/tmp/naxsi/naxsi_src --modules-path=/usr/lib/nginx/modules --conf-path=${CONF_PREFIX}/nginx.conf --error-log-path=${LOG_PREFIX}/error.log --http-log-path=${LOG_PREFIX}/access.log --pid-path=${VAR_PREFIX}/nginx.pid --lock-path=${VAR_PREFIX}/nginx.lock --http-client-body-temp-path=${TEMP_PREFIX}/client_temp --http-proxy-temp-path=${TEMP_PREFIX}/proxy_temp --http-fastcgi-temp-path=${TEMP_PREFIX}/fastcgi_temp --http-uwsgi-temp-path=${TEMP_PREFIX}/uwsgi_temp --http-scgi-temp-path=${TEMP_PREFIX}/scgi_temp --user=www-data --group=www-data --with-http_ssl_module --with-pcre-jit --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --add-module=/tmp/ngx_cache_purge-2.3 --add-module=/tmp/ngx_http_redis-0.3.9 --add-module=/tmp/redis2-nginx-module-0.15 --add-module=/tmp/srcache-nginx-module-0.31 --add-module=/tmp/echo-nginx-module --add-module=/tmp/ngx_devel_kit-0.3.1 --add-module=/tmp/set-misc-nginx-module-0.32 --add-module=/tmp/ngx_brotli --with-cc-opt=-Wno-error " && addgroup -g 82 -S www-data && adduser -u 82 -D -S -h /var/cache/nginx -s /sbin/nologin -G www-data www-data && apk add --no-cache --virtual .build-deps build-base ca-certificates automake autoconf git libtool binutils gnupg cmake go gcc build-base libc-dev make wget gzip openssl-dev musl-dev pcre-dev zlib-dev geoip-dev git linux-headers gnupg libxslt-dev gd-dev unzip && apk add --no-cache --update curl monit wget bash bind-tools rsync geoip openssl tini tar && cd /tmp && git clone https://github.com/google/ngx_brotli --depth=1 && cd ngx_brotli && git submodule update --init && export NGX_BROTLI_STATIC_MODULE_ONLY=1 && cd /tmp && git clone https://github.com/nbs-system/naxsi.git && echo 'adding /usr/local/share/GeoIP/GeoIP.dat database' && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoLiteCity.dat.gz && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoIP.dat.gz && gzip -d GeoIP.dat.gz && gzip -d GeoLiteCity.dat.gz && mkdir /usr/local/share/GeoIP/ && mv GeoIP.dat /usr/local/share/GeoIP/ && mv GeoLiteCity.dat /usr/local/share/GeoIP/ && chown -R www-data:www-data /usr/local/share/GeoIP/ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz && mkdir -p /usr/src && tar -zxC /usr/src -f nginx.tar.gz && rm nginx.tar.gz && cd /tmp && git clone https://github.com/openresty/echo-nginx-module.git && wget https://github.com/simpl/ngx_devel_kit/archive/v0.3.1.zip -O dev.zip && wget https://github.com/openresty/set-misc-nginx-module/archive/v0.32.zip -O setmisc.zip && wget https://people.freebsd.org/~osa/ngx_http_redis-0.3.9.tar.gz && wget https://github.com/openresty/redis2-nginx-module/archive/v0.15.zip -O redis.zip && wget https://github.com/openresty/srcache-nginx-module/archive/v0.31.zip -O cache.zip && wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.zip -O purge.zip && tar -zx -f ngx_http_redis-0.3.9.tar.gz && unzip dev.zip && unzip setmisc.zip && unzip redis.zip && unzip cache.zip && unzip purge.zip && cd /usr/src/nginx-$NGINX_VERSION && ./configure $CONFIG --with-debug && make -j$(getconf _NPROCESSORS_ONLN) && mv objs/nginx objs/nginx-debug && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so && ./configure $CONFIG && make -j$(getconf _NPROCESSORS_ONLN) && make install && rm -rf /etc/nginx/html/ && mkdir /etc/nginx/conf.d/ && mkdir -p /usr/share/nginx/html/ && install -m644 html/index.html /usr/share/nginx/html/ && install -m644 html/50x.html /usr/share/nginx/html/ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules && strip /usr/sbin/nginx* && strip /usr/lib/nginx/modules/.so && mkdir -p /usr/local/bin/ && mkdir -p ${CACHE_PREFIX} && mkdir -p ${CERTS_PREFIX} && cd /etc/pki/tls/ && nice -n +5 openssl dhparam -out /etc/pki/tls/dhparam.pem.default 2048 && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/.so /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache --virtual .nginx-rundeps $runDeps && apk del .build-deps && apk del .gettext && cd /tmp/naxsi && mv naxsi_config/naxsi_core.rules /etc/nginx/naxsi_core.rules && mv /tmp/envsubst /usr/local/bin/ && rm -rf /tmp/* && rm -rf /usr/src/* && ln -sf /dev/stdout ${LOG_PREFIX}/access.log && ln -sf /dev/stderr ${LOG_PREFIX}/error.log && ln -sf /dev/stdout ${LOG_PREFIX}/blocked.log' returned a non-zero code: 22
Build has failed!

Deploy failed!
Error: {"code":22,"message":"The command '/bin/sh -c set -x && CONFIG=" --prefix=/usr/share/nginx/ --sbin-path=/usr/sbin/nginx --add-module=/tmp/naxsi/naxsi_src --modules-path=/usr/lib/nginx/modules --conf-path=${CONF_PREFIX}/nginx.conf --error-log-path=${LOG_PREFIX}/error.log --http-log-path=${LOG_PREFIX}/access.log --pid-path=${VAR_PREFIX}/nginx.pid --lock-path=${VAR_PREFIX}/nginx.lock --http-client-body-temp-path=${TEMP_PREFIX}/client_temp --http-proxy-temp-path=${TEMP_PREFIX}/proxy_temp --http-fastcgi-temp-path=${TEMP_PREFIX}/fastcgi_temp --http-uwsgi-temp-path=${TEMP_PREFIX}/uwsgi_temp --http-scgi-temp-path=${TEMP_PREFIX}/scgi_temp --user=www-data --group=www-data --with-http_ssl_module --with-pcre-jit --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --add-module=/tmp/ngx_cache_purge-2.3 --add-module=/tmp/ngx_http_redis-0.3.9 --add-module=/tmp/redis2-nginx-module-0.15 --add-module=/tmp/srcache-nginx-module-0.31 --add-module=/tmp/echo-nginx-module --add-module=/tmp/ngx_devel_kit-0.3.1 --add-module=/tmp/set-misc-nginx-module-0.32 --add-module=/tmp/ngx_brotli --with-cc-opt=-Wno-error " && addgroup -g 82 -S www-data && adduser -u 82 -D -S -h /var/cache/nginx -s /sbin/nologin -G www-data www-data && apk add --no-cache --virtual .build-deps build-base ca-certificates automake autoconf git libtool binutils gnupg cmake go gcc build-base libc-dev make wget gzip openssl-dev musl-dev pcre-dev zlib-dev geoip-dev git linux-headers gnupg libxslt-dev gd-dev unzip && apk add --no-cache --update curl monit wget bash bind-tools rsync geoip openssl tini tar && cd /tmp && git clone https://github.com/google/ngx_brotli --depth=1 && cd ngx_brotli && git submodule update --init && export NGX_BROTLI_STATIC_MODULE_ONLY=1 && cd /tmp && git clone https://github.com/nbs-system/naxsi.git && echo 'adding /usr/local/share/GeoIP/GeoIP.dat database' && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoLiteCity.dat.gz && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoIP.dat.gz && gzip -d GeoIP.dat.gz && gzip -d GeoLiteCity.dat.gz && mkdir /usr/local/share/GeoIP/ && mv GeoIP.dat /usr/local/share/GeoIP/ && mv GeoLiteCity.dat /usr/local/share/GeoIP/ && chown -R www-data:www-data /usr/local/share/GeoIP/ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz && mkdir -p /usr/src && tar -zxC /usr/src -f nginx.tar.gz && rm nginx.tar.gz && cd /tmp && git clone https://github.com/openresty/echo-nginx-module.git && wget https://github.com/simpl/ngx_devel_kit/archive/v0.3.1.zip -O dev.zip && wget https://github.com/openresty/set-misc-nginx-module/archive/v0.32.zip -O setmisc.zip && wget https://people.freebsd.org/~osa/ngx_http_redis-0.3.9.tar.gz && wget https://github.com/openresty/redis2-nginx-module/archive/v0.15.zip -O redis.zip && wget https://github.com/openresty/srcache-nginx-module/archive/v0.31.zip -O cache.zip && wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.zip -O purge.zip && tar -zx -f ngx_http_redis-0.3.9.tar.gz && unzip dev.zip && unzip setmisc.zip && unzip redis.zip && unzip cache.zip && unzip purge.zip && cd /usr/src/nginx-$NGINX_VERSION && ./configure $CONFIG --with-debug && make -j$(getconf _NPROCESSORS_ONLN) && mv objs/nginx objs/nginx-debug && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so && ./configure $CONFIG && make -j$(getconf _NPROCESSORS_ONLN) && make install && rm -rf /etc/nginx/html/ && mkdir /etc/nginx/conf.d/ && mkdir -p /usr/share/nginx/html/ && install -m644 html/index.html /usr/share/nginx/html/ && install -m644 html/50x.html /usr/share/nginx/html/ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules && strip /usr/sbin/nginx* && strip /usr/lib/nginx/modules/.so && mkdir -p /usr/local/bin/ && mkdir -p ${CACHE_PREFIX} && mkdir -p ${CERTS_PREFIX} && cd /etc/pki/tls/ && nice -n +5 openssl dhparam -out /etc/pki/tls/dhparam.pem.default 2048 && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/.so /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache --virtual .nginx-rundeps $runDeps && apk del .build-deps && apk del .gettext && cd /tmp/naxsi && mv naxsi_config/naxsi_core.rules /etc/nginx/naxsi_core.rules && mv /tmp/envsubst /usr/local/bin/ && rm -rf /tmp/* && rm -rf /usr/src/* && ln -sf /dev/stdout ${LOG_PREFIX}/access.log && ln -sf /dev/stderr ${LOG_PREFIX}/error.log && ln -sf /dev/stdout ${LOG_PREFIX}/blocked.log' returned a non-zero code: 22"}
The command '/bin/sh -c set -x && CONFIG=" --prefix=/usr/share/nginx/ --sbin-path=/usr/sbin/nginx --add-module=/tmp/naxsi/naxsi_src --modules-path=/usr/lib/nginx/modules --conf-path=${CONF_PREFIX}/nginx.conf --error-log-path=${LOG_PREFIX}/error.log --http-log-path=${LOG_PREFIX}/access.log --pid-path=${VAR_PREFIX}/nginx.pid --lock-path=${VAR_PREFIX}/nginx.lock --http-client-body-temp-path=${TEMP_PREFIX}/client_temp --http-proxy-temp-path=${TEMP_PREFIX}/proxy_temp --http-fastcgi-temp-path=${TEMP_PREFIX}/fastcgi_temp --http-uwsgi-temp-path=${TEMP_PREFIX}/uwsgi_temp --http-scgi-temp-path=${TEMP_PREFIX}/scgi_temp --user=www-data --group=www-data --with-http_ssl_module --with-pcre-jit --with-http_realip_module --with-http_addition_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_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --add-module=/tmp/ngx_cache_purge-2.3 --add-module=/tmp/ngx_http_redis-0.3.9 --add-module=/tmp/redis2-nginx-module-0.15 --add-module=/tmp/srcache-nginx-module-0.31 --add-module=/tmp/echo-nginx-module --add-module=/tmp/ngx_devel_kit-0.3.1 --add-module=/tmp/set-misc-nginx-module-0.32 --add-module=/tmp/ngx_brotli --with-cc-opt=-Wno-error " && addgroup -g 82 -S www-data && adduser -u 82 -D -S -h /var/cache/nginx -s /sbin/nologin -G www-data www-data && apk add --no-cache --virtual .build-deps build-base ca-certificates automake autoconf git libtool binutils gnupg cmake go gcc build-base libc-dev make wget gzip openssl-dev musl-dev pcre-dev zlib-dev geoip-dev git linux-headers gnupg libxslt-dev gd-dev unzip && apk add --no-cache --update curl monit wget bash bind-tools rsync geoip openssl tini tar && cd /tmp && git clone https://github.com/google/ngx_brotli --depth=1 && cd ngx_brotli && git submodule update --init && export NGX_BROTLI_STATIC_MODULE_ONLY=1 && cd /tmp && git clone https://github.com/nbs-system/naxsi.git && echo 'adding /usr/local/share/GeoIP/GeoIP.dat database' && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoLiteCity.dat.gz && wget -N https://raw.githubusercontent.com/openbridge/nginx/master/geoip/GeoIP.dat.gz && gzip -d GeoIP.dat.gz && gzip -d GeoLiteCity.dat.gz && mkdir /usr/local/share/GeoIP/ && mv GeoIP.dat /usr/local/share/GeoIP/ && mv GeoLiteCity.dat /usr/local/share/GeoIP/ && chown -R www-data:www-data /usr/local/share/GeoIP/ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz && mkdir -p /usr/src && tar -zxC /usr/src -f nginx.tar.gz && rm nginx.tar.gz && cd /tmp && git clone https://github.com/openresty/echo-nginx-module.git && wget https://github.com/simpl/ngx_devel_kit/archive/v0.3.1.zip -O dev.zip && wget https://github.com/openresty/set-misc-nginx-module/archive/v0.32.zip -O setmisc.zip && wget https://people.freebsd.org/~osa/ngx_http_redis-0.3.9.tar.gz && wget https://github.com/openresty/redis2-nginx-module/archive/v0.15.zip -O redis.zip && wget https://github.com/openresty/srcache-nginx-module/archive/v0.31.zip -O cache.zip && wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.zip -O purge.zip && tar -zx -f ngx_http_redis-0.3.9.tar.gz && unzip dev.zip && unzip setmisc.zip && unzip redis.zip && unzip cache.zip && unzip purge.zip && cd /usr/src/nginx-$NGINX_VERSION && ./configure $CONFIG --with-debug && make -j$(getconf _NPROCESSORS_ONLN) && mv objs/nginx objs/nginx-debug && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so && ./configure $CONFIG && make -j$(getconf _NPROCESSORS_ONLN) && make install && rm -rf /etc/nginx/html/ && mkdir /etc/nginx/conf.d/ && mkdir -p /usr/share/nginx/html/ && install -m644 html/index.html /usr/share/nginx/html/ && install -m644 html/50x.html /usr/share/nginx/html/ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules && strip /usr/sbin/nginx* && strip /usr/lib/nginx/modules/.so && mkdir -p /usr/local/bin/ && mkdir -p ${CACHE_PREFIX} && mkdir -p ${CERTS_PREFIX} && cd /etc/pki/tls/ && nice -n +5 openssl dhparam -out /etc/pki/tls/dhparam.pem.default 2048 && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/.so /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache --virtual .nginx-rundeps $runDeps && apk del .build-deps && apk del .gettext && cd /tmp/naxsi && mv naxsi_config/naxsi_core.rules /etc/nginx/naxsi_core.rules && mv /tmp/envsubst /usr/local/bin/ && rm -rf /tmp/* && rm -rf /usr/src/* && ln -sf /dev/stdout ${LOG_PREFIX}/access.log && ln -sf /dev/stderr ${LOG_PREFIX}/error.log && ln -sf /dev/stdout ${LOG_PREFIX}/blocked.log' returned a non-zero code: 22
`

Unable to serve static files proxying HTTPS

Hi,

Thanks for sharing this project. I've been playing around with your optimized config for a while with your Nginx - OB PHP_FPM combo, looks great! I'm having some config problems using the docker-compose build approach. After deploying a pre made PHP app to the respective volumes images build succeeds and I'm able to get into the site, but static content shows mixed content problems. Spend a couple of days reading stackoverflow and lots of articles about http-https mixed content with Nginx reverse proxy and cache but I can't figure out how to resolve this. Changed parameters on proxy headers , disabled some SSL and been modifying so much settings of Nginx that I've lost track. I'm still unable to see static contents via https. Error on browser is the well known Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure script '<URL>'. This request has been blocked; the content must be served over HTTPS.. Is the same for every static resource, PHP answers look ok. I understand this is related to relaying traffic to the http://proxy. Logs on stdout show something like: { "@timestamp": "2020-10-16T16:46:29+00:00", "@fields": { "remote_addr": "127.0.0.1", "remote_user": "-", "status": "200", "request": "GET /setup/setup.js?t=2.7.1 HTTP/1.1", "request_uri": "/setup/setup.js?t=2.7.1", "request_method": "GET", "request_time": "0.000", "request_uri_query": "t=2.7.1", "http_referrer": "https://vfvsapapcmitop1.virtualfactor.co/setup/index.php", "http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36", "http_forward": "112.246.50.189, 172.25.0.1, 127.0.0.1", "http_header": "-", "body_bytes_sent": "589", "geo_country": "-", "geo_city": "-", "server_name": "vfvsapapcmitop1", "upstream_addr": "-", "upstream_status": "-", "upstream_response_time": "-", "upstream_response_length": "-", "upstream_cache_status": "-" } }, but does not look like an error.

Thanks in advance!

Turning off cache for development

How do you turn off the cache for development purposes? It is frustratingly difficult to develop now as this image caches so agressively (which is awesome for production though).

Dev mode does not work

First

Dev mode is commented on this line, so it is never activated.

Second

Dev mode does not respect the env variable NGINX_DEV_INSTALL. In fact, there is not a single reference to NGINX_DEV_INSTALL in the whole repository. Instead, some of the logic seems to reference the NGINX_CONFIG variable instead.

Example from docker-entrypoint.sh

if [[ $NGINX_CONFIG != "basic" ]]; then bots else echo "OK: Bot protection will not be activated in dev mode"; fi

Why does it check NGINX_CONFIG instead of NGINX_DEV_INSTALL?

nginx: [emerg] BIO_new_file Error

Describe the bug
Hi, after a fresh installation of nginx+php-fpm, nginx container stop trowing this error

checksum: file /etc/letsencrypt/live/mapsgrabber.com/fullchain.pem is not regular file
/etc/monit.d/check_nginx:21: Cannot compute a checksum for file /etc/letsencrypt/live/mapsgrabber.com/fullchain.pem ''/usr/sbin/nginx -s reload''
 New Monit id: caff48aa9d2cef89f554dd5699cc3785
 Stored in '/root/.monit.id'
Starting Monit 5.25.1 daemon with http interface at [localhost]:2849
OK: All setup processes have completed. NGINX Service is now running...
2018/10/25 17:22:56 [emerg] 1#1: BIO_new_file("/etc/letsencrypt/live/mapsgrabber.com/fullchain.pem") failed (SSL: error:02FFF002:system library:func(4095):No such file or directory:fopen('/etc/letsencrypt/live/mapsgrabber.com/fullchain.pem', 'r') error:20FFF080:BIO routines:CRYPTO_internal:no such file)
nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/mapsgrabber.com/fullchain.pem") failed (SSL: error:02FFF002:system library:func(4095):No such file or directory:fopen('/etc/letsencrypt/live/mapsgrabber.com/fullchain.pem', 'r') error:20FFF080:BIO routines:CRYPTO_internal:no such file)

my env

NGINX_DOCROOT=/usr/share/nginx/html
NGINX_SERVER_NAME=mapsgrabber.com
NGINX_CONFIG=php
PHP_FPM_UPSTREAM=localhost:9000
REDIS_UPSTREAM=redis:6379
NGINX_PROXY_UPSTREAM=localhost:8080

maybe a permission error? i run docker with root user
To Reproduce
Steps to reproduce the behavior:
i used this docker yml

version: '3.1'
services:
  nginx:
    image: openbridge/nginx
    container_name: nginx
    ports:
      - 80:80
      - 443:443
    tty: true
    tmpfs:
      - /var/cache
    volumes:
      - db_data:/usr/share/nginx/html
      #- certs:/etc/letsencrypt/live
    ulimits:
      nproc: 65535
      nofile:
          soft: 49999
          hard: 99999
    env_file:
      - ./env/stage.env
  mariadb:
    image: mariadb:latest
    container_name: mariadb
    environment:
      MYSQL_ROOT_PASSWORD: Pettinell@2009
      MYSQL_DATABASE: mapsgra
      MYSQL_USER: root
      MYSQL_PASSWORD: Pettinell@2009
    tty: true
    volumes:
       - db_data:/var/lib/mysql
    ulimits:
      nproc: 65535
      nofile:
          soft: 49999
          hard: 99999
  php-fpm:
    image: openbridge/ob_php-fpm
    container_name: php-fpm
    restart: always
    depends_on:
      - mariadb
    env_file:
      - ./env/stage.env
    ports:
      - 9001:9000
    tmpfs:
      - /var/cache
    tty: true
    volumes:
       - db_data:/usr/share/nginx/html
    ulimits:
      nproc: 65535
      nofile:
          soft: 49999
          hard: 99999
  redis:
    image: redis
    container_name: redis
    restart: always
volumes:
  db_data:
  certs:

Expected behavior
docker logs nginx ... and i see the error above

Desktop (please complete the following information):

  • OS: Ubuntu +
    Docker version 18.06.1-ce, build e68fc7a +
    docker-compose version 1.22.0, build f46880fe

Certificate issue running localhost

Hi,

I currently have a rancher based apache php stack running wordpress but looking for something with better performance etc

I'm trying to test out the wordpress stack but get an issue on start up with nginx server
I'm testing on a local vm and was expecting it to run under localhost. am I mistaken ?

I have been able to get rest working but nginx keeps restarting so i'm just looking at the nginx part

the error I get is:

nginx | OK: All setup processes have completed. NGINX Service is now running... nginx | 2018/09/18 22:54:52 [emerg] 1#1: BIO_new_file("/etc/letsencrypt/live/localhost/fullchain.pem") failed (SSL: error:02FFF002:system library:func(4095):No such file or directory:fopen('/etc/letsencrypt/live/localhost/fullchain.pem', 'r') error:20FFF080:BIO routines:CRYPTO_internal:no such file) nginx | nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/localhost/fullchain.pem") failed (SSL: error:02FFF002:system library:func(4095):No such file or directory:fopen('/etc/letsencrypt/live/localhost/fullchain.pem', 'r') error:20FFF080:BIO routines:CRYPTO_internal:no such file) nginx exited with code 1

Is it possible to run nginx without a Letsencrypt cert?

I have a Google cloud test server to try this on

"variables_hash_max_size" directive is duplicate

Describe the bug
When I docker-compose up, I have this error before nginx exiting:

2019/07/04 12:02:38 [emerg] 1#1: "variables_hash_max_size" directive is duplicate in /etc/nginx/conf.d/botblocker-nginx-settings.conf:18

To Reproduce
Steps to reproduce the behavior:

  1. I just picked the docker-compose php example (and changing paths)

Expected behavior

Additional context
I'm using Docker for Windows

how can I use the docker image of "openbridge/ob_php-fpm"

I don't understand how I can make connection between nginx container and php-fpm container.

I did set as bellow

NGINX_SERVER_NAME = a.com www.a.com
NGINX_APP_PLUGIN =
NGINX_CONFIG=php
NGINX_BAD_BOTS=true
NGINX_DEV_INSTALL=true
PHP_FPM_UPSTEAM=localhost:9000
REDIS_UPSTREAM=redis:6379
NGINX_PROXY_UPSTREAM=localhost:8080
NGINX_DOCTOO=/usr/share/nginx/html
NGINX_CDN_HOST=a.com

I couldn't test with localhost mysql till now...

I need your advice bro.. :)

502 Bad Gateway (ob_php-fpm/wordpress)

502 Bad Gateway when run openbridge/nginx with mariadb and wordpress-fpm or ob_php-fpm

Hello, please i always get 502 bad gateway when run openbridge/nginx with mariadb & wordpress or only with ob_php-fpm like some issus with nginx and php-fpm connection

Please how i can solve this issue, i would appreciate your help.
My docker-compose.yml , env file and logs are bellow

Error
502 Bad Gateway
nginx

Config
Env: local
Os: Windows 10 pro
Docker version: 2.0.0.3 (31259) (Channel: stable -Build: 8858db3

Env file
nginx.env:
NGINX_SERVER_NAME=localhost
NGINX_APP_PLUGIN=
NGINX_CONFIG=php
NGINX_DEV_INSTALL=true
PHP_FPM_UPSTREAM=localhost:9000
REDIS_UPSTREAM=redis:6379
NGINX_PROXY_UPSTREAM=localhost:8080
NGINX_DOCROOT=/var/www/html

docker-compose.yml
`version: '3.3'

services:

nginx:
image: openbridge/nginx
container_name: nginx
depends_on:
- redis
- wordpress
ports:
- '80:80'
- '443:443'
env_file:
- ./env/nginx.env
volumes:
- ./app:/var/www/html

mariadb:
container_name: mariadb
image: mariadb
restart: always
volumes:
- ./app:/var/lib/mysql
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: root
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
command:
'mysqld --innodb-flush-method=fsync'

wordpress:
container_name: wordpress
image: wordpress:fpm-alpine
volumes:
- ./app:/var/www/html
environment:
WORDPRESS_DB_HOST: mariadb:3306
WORDPRESS_DB_USER: root
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_PASSWORD: password
WORDPRESS_TABLE_PREFIX: wp_
depends_on:
- mariadb
restart: always

redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
volumes:
app: {}`

Logs
redis
1:C 02 Jun 2019 22:33:31.866 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 02 Jun 2019 22:33:31.866 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 02 Jun 2019 22:33:31.866 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 02 Jun 2019 22:33:31.867 * Running mode=standalone, port=6379. 1:M 02 Jun 2019 22:33:31.867 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 1:M 02 Jun 2019 22:33:31.867 # Server initialized 1:M 02 Jun 2019 22:33:31.867 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 1:M 02 Jun 2019 22:33:31.867 * Ready to accept connections

mariadb
2019-06-02 22:33:33 0 [Note] mysqld (mysqld 10.3.15-MariaDB-1:10.3.15+maria~bionic) starting as process 1 ... 2019-06-02 22:33:33 0 [Note] InnoDB: Using Linux native AIO 2019-06-02 22:33:33 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-06-02 22:33:33 0 [Note] InnoDB: Uses event mutexes 2019-06-02 22:33:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2019-06-02 22:33:33 0 [Note] InnoDB: Number of pools: 1 2019-06-02 22:33:33 0 [Note] InnoDB: Using SSE2 crc32 instructions 2019-06-02 22:33:33 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M 2019-06-02 22:33:33 0 [Note] InnoDB: Completed initialization of buffer pool 2019-06-02 22:33:33 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2019-06-02 22:33:33 0 [Note] InnoDB: 128 out of 128 rollback segments are active. 2019-06-02 22:33:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2019-06-02 22:33:33 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2019-06-02 22:33:33 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2019-06-02 22:33:33 0 [Note] InnoDB: Waiting for purge to start 2019-06-02 22:33:33 0 [Note] InnoDB: 10.3.15 started; log sequence number 1630842; transaction id 21 2019-06-02 22:33:33 0 [Note] Plugin 'FEEDBACK' is disabled. 2019-06-02 22:33:33 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2019-06-02 22:33:33 0 [Note] InnoDB: Buffer pool(s) load completed at 190602 22:33:33 2019-06-02 22:33:33 0 [Note] Server socket created on IP: '::'. 2019-06-02 22:33:33 0 [Warning] 'proxies_priv' entry '@% root@4f1332f8fd18' ignored in --skip-name-resolve mode. 2019-06-02 22:33:33 0 [Note] Reading of all Master_info entries succeded 2019-06-02 22:33:33 0 [Note] Added new Master_info '' to hash table 2019-06-02 22:33:33 0 [Note] mysqld: ready for connections. Version: '10.3.15-MariaDB-1:10.3.15+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution

nginx
{ "@timestamp": "2019-06-02T22:40:37+00:00", "@fields": { "remote_addr": "172.23.0.1", "remote_user": "-", "status": "502", "request": "GET / HTTP/2.0", "request_uri": "/", "request_method": "GET", "request_time": "0.000", "request_uri_query": "-", "http_referrer": "-", "http_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", "http_forward": "172.23.0.1", "http_header": "-", "body_bytes_sent": "552", "geo_country": "-", "geo_city": "-", "server_name": "localhost", "upstream_addr": "127.0.0.1:8080", "upstream_status": "502", "upstream_response_time": "0.000", "upstream_response_length": "552", "upstream_cache_status": "BYPASS" } } 2019/06/02 22:40:37 [error] 1041#1041: *92 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost" { "@timestamp": "2019-06-02T22:40:37+00:00", "@fields": { "remote_addr": "127.0.0.1", "remote_user": "-", "status": "502", "request": "GET / HTTP/1.1", "request_uri": "/", "request_method": "GET", "request_time": "0.000", "request_uri_query": "-", "http_referrer": "-", "http_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", "http_forward": "172.23.0.1, 127.0.0.1", "http_header": "-", "body_bytes_sent": "552", "geo_country": "-", "geo_city": "-", "server_name": "localhost", "upstream_addr": "127.0.0.1:9000", "upstream_status": "502", "upstream_response_time": "0.000", "upstream_response_length": "0", "upstream_cache_status": "MISS" } } { "@timestamp": "2019-06-02T22:40:37+00:00", "@fields": { "remote_addr": "172.23.0.1", "remote_user": "-", "status": "502", "request": "GET / HTTP/2.0", "request_uri": "/", "request_method": "GET", "request_time": "0.000", "request_uri_query": "-", "http_referrer": "-", "http_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", "http_forward": "172.23.0.1", "http_header": "-", "body_bytes_sent": "552", "geo_country": "-", "geo_city": "-", "server_name": "localhost", "upstream_addr": "127.0.0.1:8080", "upstream_status": "502", "upstream_response_time": "0.000", "upstream_response_length": "552", "upstream_cache_status": "BYPASS" } }

**wordpress **
'[02-Jun-2019 22:33:33 UTC] PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22

MySQL Connection Error: (2002) Connection refused
[02-Jun-2019 22:33:36] NOTICE: fpm is running, pid 1
[02-Jun-2019 22:33:36] NOTICE: ready to handle connections'

Nginx Pagespeed module?

Hello and thanks for creating this image!

I see the project has a Dockerfile-pagespeed. Can that be used, or is it deprecated, since it hasn't had an update in 2 years? We love your image, but would like to have the pagespeed module for nginx installed, which has to be included at buildtime.

Container fails to start: unknown directive "max_fails=3"

Describe the bug
I am trying to use docker image openbridge/nginx:latest to run wordpress:php7.1-fpm-alpine on another container.

I created a volume called root and mapped it to /var/www/html on the wordpress container and mapped the same volume to /usr/share/nginx/html in nginx container.

My Dockerfile:

FROM openbridge/nginx:latest
ENV NGINX_CONFIG=php
ENV NGINX_DEV_INSTALL=true
ENV PHP_FPM_UPSTREAM=wordpress:9000
ENV NGINX_SERVER_NAME=localhost

The container fails to start with this error:

nginx: [emerg] unknown directive "max_fails=3" in /etc/nginx/upstream.d/proxy.conf:3

Maybe I'm just not following the docs correctly. Could you help me out?

Fail2ban integration

I want to suggest you to install Fail2ban tool or provide notes in the documentation how to integrate with the Nginx container. Right now I'm using log to file Nginx configuration and separate Fail2ban container.

I want to use this dockers for django.

Is your feature request related to a problem? Please describe.
I want to use this docker for django and flask using the uwsgi.
just following the guide on your git-book, I hope to work everything which are the redis and nginx modue etc.

Describe the solution you'd like
I need your the nginx performance guide to use django or flask.
and the docker too.

it's so amazing docker source here.
So I'd like to use everything.

Currently I'm using php but I have mind to use python platform too.
Of course, using your docker.

So I hope that you will get a mind to make new branches for python platform :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.