gpt4 book ai didi

Layui Layer Laydate文档部署到个人服务器(含HTML文档镜像下载)

转载 作者:知者 更新时间:2024-03-13 07:58:33 27 4
gpt4 key购买 nike

背景:官方layui文档关停,用人家的镜像文档过一阵子又用不了实属恶心人,所以想着自己部署到自己服务器上,想看就看

1. 下载layui文档 == 我从别人哪里fork过来的

https://gitee.com/changenen/layui_doc

2. layui文档上传到服务器

将layui放到linux上随便一个文件夹(Nginx配置也随之改变,如想直接粘贴复制我的配置,也根据我的路径上传即可)

3. nginx配置到layui文档的目录

Nginx配置 == 请自行取有关layui的配置即可 == 配置好Nginx重新加载Nginx配置即可生效

user www www;
worker_processes auto;
error_log /www/wwwlogs/nginx_error.log crit;
pid /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;

events {
    use epoll;
    worker_connections 51200;
    multi_accept on;
}

http {
    include mime.types;
    #include luawaf.conf;

    include proxy.conf;

    default_type application/octet-stream;

    server_names_hash_bucket_size 512;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 50m;

    sendfile on;
    tcp_nopush on;

    keepalive_timeout 60;

    tcp_nodelay on;

    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;

    gzip on;
    gzip_min_length 1k;
    gzip_buffers 4 16k;
    gzip_http_version 1.1;
    gzip_comp_level 2;
    gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
    gzip_vary on;
    gzip_proxied expired no-cache no-store private auth;
    gzip_disable "MSIE [1-6]\.";

    limit_conn_zone $binary_remote_addr zone=perip:10m;
    limit_conn_zone $server_name zone=perserver:10m;

    server_tokens off;
    
    
    access_log /www/wwwlogs/access.log;
    log_format main '$scheme-$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"'
    '"$request_time" "$upstream_response_time"';
    
    
    upstream baota {
        server 127.0.0.1:9000;
    }

    server {
        listen 888;
        server_name phpmyadmin;
        index index.html index.htm index.php;
        root /www/server/phpmyadmin;
        location ~ /tmp/ {
            return 403;
        }

        #error_page   404   /404.html;
        include enable-php.conf;

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
            expires 30d;
        }

        location ~ .*\.(js|css)?$ {
            expires 12h;
        }

        location ~ /\. {
            deny all;
        }
    }

    server {
        listen 80;
        error_page 400 404 413 /4xx.html;
        error_page 500 502 503 504 /50x.html;
        
        # layui文档
        location /layui_doc {
          root /www/project;
        }

        
        # layer文档
        location /layer  {
           root /www/project/layui_doc;
        }
        
        # laydate文档
        location /laydate  {
           root /www/project/layui_doc;
        }
        
        location / {
            # layui文档引用的静态文件配置
            if ($http_referer ~ '(layui_doc/)|(doc/)|(layer/)|(layui/)|(demo/)|(laydate/)|(extend/)|(alone.html)') {
                root /www/project/layui_doc;
                break;
            }
        }
          
    }

    include /www/server/panel/vhost/nginx/*.conf;
}

4. 访问 - 大功告成

ip地址/layui_doc
ip地址/layer
ip地址/laydate

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com