Code Monkey home page Code Monkey logo

static-glibc-nginx's Introduction

static-glibc-nginx

This repository contains a Makefile and patches to produce a fully statically linked NGINX binary. To achieve this, functions depending on Name Service Switch have been disabled which may cause NGINX to not behave as expected under certain conditions. If the NGINX binary encounters a code path where a function has been disabled, a message ending in "...disabled for static build" will be logged. Starting NGINX as an unprivileged user may be used to avoid some of these code paths.

Licensing

The Makefile and NGINX patch are licensed under the 2-clause BSD license.

Instructions

To build NGINX binary, simply run make (which is implicitly make all) inside the root of the repository. The statically linked binary and all of its configuration dependencies will be placed in a folder named "nginx". If the NGINX binary / its folder is relocated, use the "-p" flag to point NGINX to the correct directory.

Some of the other targets provided by the Makefile include:

  • clean: Delete all folders created by this script.
  • cleaner: Delete all files created by this script which includes the downloaded tar-balls.
  • test: Run a simple test of NGINX. The NGINX binary must already be built, port 4475 must be available for use, and curl(1) must be installed. This target does not implicitly build NGINX.

Attributions

The following scripts were referenced when creating this project:

static-glibc-nginx's People

Contributors

crestone avatar ericpruitt avatar mathieu-aubin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

static-glibc-nginx's Issues

Error: getpwnam("nobody") disabled for static build (38: Function not implemented)

After modification of your Makefile (see pull requests)
I get some errors after run nginx binary:

src/objs/nginx -c /usr/src/nginx/static-nginx/src/conf/nginx.conf -t
nginx: [alert] could not open error log file: open() "../nginx/logs/error.log" failed (2: No such file or directory)
nginx: the configuration file /usr/src/nginx/static-nginx/src/conf/nginx.conf syntax is ok
2016/08/06 21:50:52 [emerg] 23439#0: getpwnam("nobody") disabled for static build (38: Function not implemented)
nginx: configuration file /usr/src/nginx/static-nginx/src/conf/nginx.conf test failed

What could be the reason of this?

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.