Skip to content

sanvu88/docker-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hostvn.net - Tên miền, Web Hosting, Email, VPS & Dịch vụ lưu trữ Website

#####################################################################################

About Hostvn.net Nginx

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 pull hostvn/hostvn.net-nginx
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;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published