Skip to content

jonkofee/nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nginx latest

Wrapper for nginx official image

Features

  • Default server responses 404 code
  • Using environment variables in the config file
  • Enabled GZIP
  • Default charset UTF-8
  • Off server tokens (nginx version in response header)
  • Keepalive timeout 30 sec
  • Enabled sendfile

Exampe use ENV var in config file

docker-compose.yml

version: '3'
services:
  web:
  image: jonkofee/nginx
  working_dir: /code
  ports:
    - ${NGINX_SERVER_PORT}:80
  volumes:
    - ./:/code
    - ./docker/nginx/conf:/etc/nginx/conf.d
  environment:
    - DOMAIN=test.local
    - PORT=80 

host.conf

server {
  server_name api.${DOMAIN};
  listen ${POST}

  location / {
    root /code;

    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass php:9000;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root/index.php;
    fastcgi_param PATH_INFO $fastcgi_path_info;
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages