Skip to content

Default nginx.conf #38

Description

@phaleth

Any chance to provide the default nginx.conf such as the following one, but maybe without logs enabled by default?

Also while leaving out the current server section and including the include line at the bottom so that the user of the image can copy in their own config or maybe override the /etc/nginx/conf.d/default.conf if it's present, as shown bellow.

# configuration file /etc/nginx/nginx.conf:

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

Very nice and compact image, btw.

Example usage would then be:

FROM ghcr.io/ammnt/freenginx:main
...
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions