zoukankan      html  css  js  c++  java
  • Nginx_配置

    user www-data;
    worker_processes auto;
    pid /run/nginx.pid;
    
    events {
        worker_connections 768;
        # multi_accept on;
    }
    
    http {
    
        ##
        # Basic Settings
        ##
    
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;
    
        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;
    
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
    
        ##
        # SSL Settings
        ##
    
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;
    
        ##
        # Logging Settings
        ##
    
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
    
        ##
        # Gzip Settings
        ##
    
        gzip on;
        gzip_disable "msie6";
        #gzip 压缩文件类型
            gzip_types text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
    
        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    
        ##
        # Virtual Host Configs
        ##
    
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
    
    
    
    #mail {
    #    # See sample authentication script at:
    #    # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
    # 
    #    # auth_http localhost/auth.php;
    #    # pop3_capabilities "TOP" "USER";
    #    # imap_capabilities "IMAP4rev1" "UIDPLUS";
    # 
    #    server {
    #        listen     localhost:110;
    #        protocol   pop3;
    #        proxy      on;
    #    }
    # 
    #    server {
    #        listen     localhost:143;
    #        protocol   imap;
    #        proxy      on;
    #    }
    #}
    server {
        listen       2021;
        server_name  localhost; # 修改为docker服务宿主机的ip
    
        location / {
      
            root   /usr/share/nginx/html;#定义服务器的默认网站根目录位置
            index  index.html index.htm;#定义首页索引文件的名称
            try_files $uri $uri/ /index.html =404;
        }
       # 定义错误提示页面
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    }
    彪悍的人生不需要解释,彪悍的代码不需要注释。
  • 相关阅读:
    自定义 radio 的样式,更改选中样式
    【Vue中的坑】vue项目中动态绑定src不显示图片解决方法
    js复制内容到剪切板
    js实现鼠标单击或者双击事件
    代码修改shader Properties uniform变量
    关于unity中BindChannels的理解
    shader Category
    Unity手游之路自动寻路Navmesh之高级主题
    Unity手游之路自动寻路Navmesh之入门
    Unity 自动寻路Navmesh之跳跃,攀爬,斜坡
  • 原文地址:https://www.cnblogs.com/ingstyle/p/14413128.html
Copyright © 2011-2022 走看看