Sign inSign up

hostvn/hostvn.net-nginx

By hostvn

•Updated over 5 years ago

Nginx is developed under Nginx Docker official-customizing the configuration & adding some modules

Image
2

466

hostvn/hostvn.net-nginx repository overview

Hostvn.net⁠ Nginx is developed based on the Nginx Docker official, not only inherits the advantages of Nginx Docker official but also helps to customize the configuration and add some modules.

⁠Quick reference

⁠Supported tags

  • latest, 1.20.0, 1.20.1, 1.21.0

⁠Changes:

  • Customize and Optimize /etc/nginx/nginx.conf file configuration more optimally
  • Add module ngx_brotli
  • Add module ngx_headers_more
  • Add the security configuration file at: /etc/nginx/extra/security.conf
  • Block Exploits, SQL Injections, File Injections, Spam, User Agents, Etc configuration file at: /etc/nginx/extra/block.conf
  • Add the configuration file CloudFlare ip: /etc/nginx/cloudflare.conf
  • Added security header structure

⁠Using:

docker run --name nginx -p 80:80 -p 443:443 --restart always -v /root/web:/usr/share/nginx/html -d hostvn/hostvn.net-nginx

Also you can refer to how to use here: https://hub.docker.com/_/nginx⁠

⁠vHost example


server {
    listen 80;
    #error_log /usr/share/nginx/logs/error.log;
    server_name example.org www.example.org;
    root /usr/share/nginx/html;
    index index.php index.html index.htm;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        include /etc/nginx/nginx_limits.conf;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        if (-f $request_filename) {
            fastcgi_pass php:9000;
        }
    }

    include /etc/nginx/extra/security.conf;
}

Tag summary

Content type

Image

Digest

Size

53.7 MB

Last updated

over 5 years ago

docker pull hostvn/hostvn.net-nginx