Skip to content

Nginx 镜像

镜像列表

镜像说明
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.27.31.27.3 代表版本号,支持:386、amd64、arm、arm64、mips64le、ppc64le、s390x 平台
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.27.2
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.27.1
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.27.0
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.26.1
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.26.0
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.25.4
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.25.2-host.access.log
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.25.2
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.25.1
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.25.0
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.24.0
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.23.4
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.23.3
registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.14-alpine
shell
sudo docker run \
  -itd \
  --restart always \
  --name nginx-1.27.2 \
  -p 80:80 \
  -p 443:443 \
  -d registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.27.2
shell
sudo docker run \
  -itd \
  --restart always \
  --name nginx-1.27.2 \
  -p 80:80 \
  -p 443:443 \
  -v /nginx/conf.d:/etc/nginx/conf.d \
  -d registry.cn-qingdao.aliyuncs.com/xuxiaoweicomcn/nginx:1.27.2
shell
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;
}
shell
server {
    listen       80;
    listen  [::]:80;
    server_name  localhost;

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

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}
shell
http {
    # 其他配置项

    server_tokens off;

    # 其他配置项
}
shell
cat /etc/apt/sources.list.d/debian.sources
sed -i "s#deb.debian.org#mirrors.aliyun.com#" /etc/apt/sources.list.d/debian.sources
sed -i "s#security.debian.org#mirrors.aliyun.com#" /etc/apt/sources.list.d/debian.sources
cat /etc/apt/sources.list.d/debian.sources
apt update