背景:官方layui文档关停,用人家的镜像文档过一阵子又用不了实属恶心人,所以想着自己部署到自己服务器上,想看就看
https://gitee.com/changenen/layui_doc
将layui放到linux上随便一个文件夹(Nginx配置也随之改变,如想直接粘贴复制我的配置,也根据我的路径上传即可)
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;
}
ip地址/layui_doc
ip地址/layer
ip地址/laydate
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/weixin_39651356/article/details/121431118
内容来源于网络,如有侵权,请联系作者删除!