Hostvn.net - Tên miền, Web Hosting, Email, VPS & Dịch vụ lưu trữ Website
#####################################################################################
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.
- Maintained by: Hostvn.net
- Docker hub: https://hub.docker.com/r/hostvn/hostvn.net-nginx
- Nginx Official: https://hub.docker.com/_/nginx
- Nginx Brotli module: https://github.com/google/ngx_brotli
- Nginx header more module: https://github.com/openresty/headers-more-nginx-module
- latest, 1.20.0, 1.20.1, 1.21.0
- 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
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
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;
}