1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Contribution How to compile NGINX with additional modules ( pagespeed / cache_purge / headers-more / and others )

Discussion in 'Plesk Extensions' started by UFHH01, Dec 15, 2016.

  1. learning_curve

    learning_curve Regular Pleskian

    13
    35%
    Joined:
    May 3, 2017
    Messages:
    144
    Likes Received:
    46
    Location:
    UK & other variable locations
    :D No, don't worry we fully understand it. Maybe it's just our style of writing messages
    Yes we know and we have done already (see below)
    Yes, that was always clear and was an easy job
    That's the most useful re-affirmation for us and others really, so thanks for that.
    The Lock setting within the panel is actually ignored, despite the GUI visual confirmation mentioned previously.
    So we are back to the Official Plesk "sw-nginx" now, with all previous settings restored and fully operational.
    We'll run the process again, re-compile and move back to our own compiled "sw-nginx" shortly.
    No problem really, once the 'Lock" panel setting challenge was / is now fully understood ;)
     
  2. UFHH01

    UFHH01 Plesk addicted!

    44
    64%
    Joined:
    Jun 11, 2013
    Messages:
    6,762
    Likes Received:
    1,712
    Location:
    Hamburg / Germany
    Hi learning_curve,

    maybe you missed another important part of my tutorial?



    Just for your ( personal ) informations:
    I was just a little bit concerned, that "you might not see the tree in the woods" ( I don't know, if you know this and I don't even know if it makes sense in english - it was translated from german by me :p ), as your questions and statements leads me to think, that you overread as well the depending error message(s), which you get after using "nginx -t" - as this will immidiately point you to possible misconfigurations within your nginx - configuration files. ;)
     
    Dukemaster likes this.
  3. learning_curve

    learning_curve Regular Pleskian

    13
    35%
    Joined:
    May 3, 2017
    Messages:
    144
    Likes Received:
    46
    Location:
    UK & other variable locations
    Ahhh we understand why you posted what you did now. Torschlusspanik! :p
    Joking aside though, Yes we did read that and we then said this, in #73 afterwards:
    What your post does now is confrm to us these are NOT exactly the same.
    Again, that's no problem at all now we undestood that clearly.
    It does make the Lock option on the panel seem a bit pointless though, unless it's designed to work only on NON-Plesk items
    It may have been '...can't see the wood for the trees' but we don't speak any German anyway, so don't worry. We always remember Torschlusspanik because there is no direct English translation of this German word and it's a great expression!

    To try and explain this last situation clearer and finish this now:
    After running Upgrade #26 the panel reported a) when the reality (i.e. the command line) reported b)
    Using the lock option within the panel and not your LINK as explained above, was the reason why
    b) had the correct error messages, but obvioulsy these contradicted a) at that time ;)
    The update is that a) and b) now report the same (as in the official Plesk "sw-nginx" & it's status) with no error messages and it's all successfully live. We'll run through the tutorial and recompile again now, accordingly.
     
    UFHH01 likes this.
  4. learning_curve

    learning_curve Regular Pleskian

    13
    35%
    Joined:
    May 3, 2017
    Messages:
    144
    Likes Received:
    46
    Location:
    UK & other variable locations
    Which we've just completed and, just as per the first time we ran through that great tutorial, it's all worked perfectly and we're live again, with our latest self-compiled "sw-nginx" and all its added extras :) Thanks again @UFHH01
     
    UFHH01 likes this.
  5. Allan

    Allan New Pleskian

    5
    20%
    Joined:
    Mar 8, 2017
    Messages:
    15
    Likes Received:
    0
    Location:
    Brazil
    not work here, debian 8, OVH VPS Cloud

    root@vps:~/addons/nginx/nginx-1.13.6# ./configure --prefix=/etc/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 \
    > --lock-path=/var/lock/nginx.lock \
    > --pid-path=/var/run/nginx.pid \
    > --http-client-body-temp-path=/var/lib/nginx/body \
    > --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
    --http-scgi-temp-path=/var/lib/nginx/scgi \
    > --http-proxy-temp-path=/var/lib/nginx/proxy \
    > --http-scgi-temp-path=/var/lib/nginx/scgi \
    > --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
    > --user=nginx \
    > --group=nginx \
    > --with-debug \
    > --with-file-aio \
    > --with-google_perftools_module \
    > --with-mail \
    > --with-mail_ssl_module \
    > --with-threads \
    > --with-select_module \
    --with-stream \
    > --with-stream \
    > --with-stream_ssl_module \
    > --with-http_addition_module \
    > --with-http_auth_request_module \
    > --with-http_dav_module \
    > --with-http_flv_module \
    > --with-http_geoip_module \
    > --with-http_gunzip_module \
    > --with-http_gzip_static_module \
    > --with-http_image_filter_module \
    > --with-http_mp4_module \
    > --with-http_perl_module \
    > --with-http_random_index_module \
    > --with-http_realip_module \
    > --with-http_secure_link_module \
    > --with-http_stub_status_module \
    > --with-http_sub_module \
    > --with-http_ssl_module \
    > --with-http_v2_module \
    --with-http_xslt_module \
    > --with-http_xslt_module \
    > --with-poll_module \
    > --with-openssl=/usr/share/openssl \
    > --with-openssl-opt=enable-tls1_3 \
    > --add-module=/usr/share/nginx/modules/ngx_brotli \
    > --add-module=/usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable \
    > --add-module=/usr/share/passenger/ngx_http_passenger_module \
    > --add-module=/usr/share/nginx/modules/ngx_cache_purge-2.3 \
    > --add-module=/usr/share/nginx/modules/ngx_coolkit-0.2 \
    > --add-module=/usr/share/nginx/modules/ngx_slowfs_cache-1.10 \
    > --add-module=/usr/share/nginx/modules/ngx_headers-more-0.32
    checking for OS
    + Linux 3.16.0-4-amd64 x86_64
    checking for C compiler ... found
    + using GNU C compiler
    + gcc version: 4.9.2 (Debian 4.9.2-10)
    checking for gcc -pipe switch ... found
    checking for -Wl,-E switch ... found
    checking for gcc builtin atomic operations ... found
    checking for C99 variadic macros ... found
    checking for gcc variadic macros ... found
    checking for gcc builtin 64 bit byteswap ... found
    checking for unistd.h ... found
    checking for inttypes.h ... found
    checking for limits.h ... found
    checking for sys/filio.h ... not found
    checking for sys/param.h ... found
    checking for sys/mount.h ... found
    checking for sys/statvfs.h ... found
    checking for crypt.h ... found
    checking for Linux specific features
    checking for epoll ... found
    checking for EPOLLRDHUP ... found
    checking for EPOLLEXCLUSIVE ... not found
    checking for O_PATH ... found
    checking for sendfile() ... found
    checking for sendfile64() ... found
    checking for sys/prctl.h ... found
    checking for prctl(PR_SET_DUMPABLE) ... found
    checking for crypt_r() ... found
    checking for sys/vfs.h ... found
    checking for poll() ... found
    checking for /dev/poll ... not found
    checking for kqueue ... not found
    checking for crypt() ... not found
    checking for crypt() in libcrypt ... found
    checking for F_READAHEAD ... not found
    checking for posix_fadvise() ... found
    checking for O_DIRECT ... found
    checking for F_NOCACHE ... not found
    checking for directio() ... not found
    checking for statfs() ... found
    checking for statvfs() ... found
    checking for dlopen() ... not found
    checking for dlopen() in libdl ... found
    checking for sched_yield() ... found
    checking for sched_setaffinity() ... found
    checking for SO_SETFIB ... not found
    checking for SO_REUSEPORT ... found
    checking for SO_ACCEPTFILTER ... not found
    checking for SO_BINDANY ... not found
    checking for IP_BIND_ADDRESS_NO_PORT ... not found
    checking for IP_TRANSPARENT ... found
    checking for IP_BINDANY ... not found
    checking for IP_RECVDSTADDR ... not found
    checking for IP_SENDSRCADDR ... not found
    checking for IP_PKTINFO ... found
    checking for IPV6_RECVPKTINFO ... found
    checking for TCP_DEFER_ACCEPT ... found
    checking for TCP_KEEPIDLE ... found
    checking for TCP_FASTOPEN ... found
    checking for TCP_INFO ... found
    checking for accept4() ... found
    checking for kqueue AIO support ... not found
    checking for Linux AIO support ... found
    checking for int size ... 4 bytes
    checking for long size ... 8 bytes
    checking for long long size ... 8 bytes
    checking for void * size ... 8 bytes
    checking for uint32_t ... found
    checking for uint64_t ... found
    checking for sig_atomic_t ... found
    checking for sig_atomic_t size ... 4 bytes
    checking for socklen_t ... found
    checking for in_addr_t ... found
    checking for in_port_t ... found
    checking for rlim_t ... found
    checking for uintptr_t ... uintptr_t found
    checking for system byte ordering ... little endian
    checking for size_t size ... 8 bytes
    checking for off_t size ... 8 bytes
    checking for time_t size ... 8 bytes
    checking for AF_INET6 ... found
    checking for setproctitle() ... not found
    checking for pread() ... found
    checking for pwrite() ... found
    checking for pwritev() ... found
    checking for sys_nerr ... found
    checking for localtime_r() ... found
    checking for posix_memalign() ... found
    checking for memalign() ... found
    checking for mmap(MAP_ANON|MAP_SHARED) ... found
    checking for mmap("/dev/zero", MAP_SHARED) ... found
    checking for System V shared memory ... found
    checking for POSIX semaphores ... not found
    checking for POSIX semaphores in libpthread ... found
    checking for struct msghdr.msg_control ... found
    checking for ioctl(FIONBIO) ... found
    checking for struct tm.tm_gmtoff ... found
    checking for struct dirent.d_namlen ... not found
    checking for struct dirent.d_type ... found
    checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
    checking for openat(), fstatat() ... found
    checking for getaddrinfo() ... found
    configuring additional modules
    adding module in /usr/share/nginx/modules/ngx_brotli
    + ngx_brotli was configured
    adding module in /usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable

    You have set --with-debug for building nginx, but precompiled Debug binaries for
    PSOL, which ngx_pagespeed depends on, aren't available. If you're trying to
    debug PSOL you need to build it from source. If you just want to run nginx with
    debug-level logging you can use the Release binaries.

    Use the available Release binaries? [Y/n] n
    ./configure: 158: /usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable/config: [[: not found
    ./configure: 158: /usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable/confign: not found
    mod_pagespeed_dir=/usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable/psol/include
    build_from_source=false
    checking for psol ... found
    List of modules (in reverse order of applicability): ngx_http_write_filter_module ngx_http_header_filter_module ngx_http_chunked_filter_module ngx_http_v2_filter_module ngx_http_range_header_filter_module ngx_pagespeed_etag_filter ngx_http_gzip_filter_module ngx_http_brotli_filter_module ngx_pagespeed ngx_http_postpone_filter_module ngx_http_ssi_filter_module ngx_http_charset_filter_module ngx_http_xslt_filter_module ngx_http_image_filter_module ngx_http_sub_filter_module ngx_http_addition_filter_module ngx_http_gunzip_filter_module ngx_http_userid_filter_module ngx_http_headers_filter_module
    checking for psol-compiler-compat ... found
    + ngx_pagespeed was configured
    adding module in /usr/share/passenger/ngx_http_passenger_module
    ./configure: error: no /usr/share/passenger/ngx_http_passenger_module/config was found
    root@vps154381:~/addons/nginx/nginx-1.13.6# make
    make: *** No rule to make target 'build', needed by 'default'. Stop.
    root@vps:~/addons/nginx/nginx-1.13.6#
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    Make sure that you have installed passenger-dev package.
     
    Dukemaster likes this.
  7. Dukemaster

    Dukemaster Regular Pleskian

    18
     
    Joined:
    Nov 21, 2016
    Messages:
    252
    Likes Received:
    36
    Location:
    Rhein-Main - Berlin
    Hello, my good virtual reality friend @UFHH01 ,
    it's time to thank You again. For what?
    For this amazing tutorial. I use it since two months with REDIS (3.0.6) by vendor Ubuntu 16.04.3.
    It's incredible.
    The following setup works like a charm and will be stable in few days.
    Your great tutorial is ready to be updated.
    IMPORTANT CHANGE: Using pagespeed off is deprecated now and causes failures by compiling if set during update. My first update failed because I deactivated pagespeed during update.
    Standby has replaced Off - Pagespeed off has been deprecated and replaced with pagespeed standby.
    And it is necessary to make the pre-installation of uuid-dev

    This night I made the final and successful upgrade with NGINX 1.13.7 and NGX_PAGESPEED-1.13.35.1-beta (also published as beta-stable in GIT).
    Also PSOL was updated now: https://dl.google.com/dl/page-speed/psol/1.13.35.1-x64.tar.gz
    Also one module was updated: ngx_headers-more-0.33
    To give You something back, of your hard work:
    Please, feel free to copy the following parts as a replacement in your tut. I will delete the following quotes later!
    Because honors to YOU....

    PART 4+ 5 are the same like before.

    PART 7 + 8 are the same like before, except the first line in 8 where the version of nginx have to be 1.13.7

    Lots of greets
     
    Last edited: Nov 24, 2017
    Jaco likes this.
Loading...