Want to subscribe to topics you're interested in?
Become a Member

Nginx openresty

Discussion in 'Centmin Mod Insights' started by Zykov, Jun 6, 2014.

  1. Zykov

    Zykov Member

    31
    7
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    2:23 AM
    Nginx 1.7.1
    MariaDB 10
    Just trying to uprgade nginx (centmin mod b21) with
    NGINX_OPENRESTY=y
    (to get HttpEchoModule for nginx).

    I didn't find it in nginx_configure_openresty.inc and nginx_modules_openresty.inc, so I added it there manually.

    But suddenly I've got many errors about other openresty modules:
    "
    adding module in ../ngx_cache_purge-1.4
    ./configure: error: no ../ngx_cache_purge-1.4/config was found
    "

    (fixed it cause it's 2.1 for now and next...)
    "
    adding module in ../
    ./configure: error: no ..//config was found
    "
    Error: 1, Nginx configure failed.

    And no new nginx is istalled.

    Is openresty unsupported now?
    How can I add just one HttpEchoModule in a better way?
    And maybe perl module?
     
  2. eva2000

    eva2000 Administrator Staff Member

    27,784
    6,337
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,340
    Local Time:
    3:23 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah unfortunately NGINX_OPENRESTY has been neglected due to massive changes in the past few Centmin Mod releases. Will add it back for .08 release probably.

    I'll post something in Centmin Mod Insights forum later but for now you can see an example of adding custom Nginx modules manually at http://centminmod.com/nginx_webdav.html
     
    • Like Like x 1
  3. Zykov

    Zykov Member

    31
    7
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    2:23 AM
    Nginx 1.7.1
    MariaDB 10
    Thanks, just installed HttpEchoModule successfully.
    Btw founded small glitch:
    $CUSTOMSERVERNAME works only if escaped properly, so i.e. "CUSTOMSERVERSTRING='Microsoft-IIS/8.0'" won't do the job.

    Also let me propose (in nginx_configure.inc) the replacement of two variables like this:

    sed -i 's/ngx_http_server_string\[\] = "Server: nginx" CRLF/ngx_http_server_string\[\] = "Server: $CUSTOMSERVERNAME" CRLF/' src/http/ngx_http_header_filter_module.c
    sed -i 's/ngx_http_server_full_string\[\] = "Server: " NGINX_VER CRLF/ngx_http_server_full_string\[\] = "Server: $CUSTOMSERVERNAME" CRLF/' src/http/ngx_http_header_filter_module.c
     
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    27,784
    6,337
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,340
    Local Time:
    3:23 AM
    Nginx 1.13.x
    MariaDB 5.5
    thanks @Zykov (y)

    but ain't working due to the variable $CUSTOMSERVERNAME within sed single quotes with inner double quotes

    you end up with

    Code:
    static char ngx_http_server_full_string[] = "Server: $CUSTOMSERVERNAME" CRLF;
     
    Last edited: Jun 9, 2014
  5. eva2000

    eva2000 Administrator Staff Member

    27,784
    6,337
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,340
    Local Time:
    3:23 AM
    Nginx 1.13.x
    MariaDB 5.5