网络知识分享

哪吒监控面板和好看的仪表盘

哪吒监控和仪表盘

标签:

#youtube视频

https://youtu.be/cYeDmM1UNn4

#Homepage URL
Https://你的域名

#Authorization callback URL
Https://你的域名/oauth2/callback

#哪吒监控项目Github地址
https://github.com/naiba/nezha

#哪吒监控官方文档
https://nezha.wiki/guide/dashboard.html

#安装nginx
apt install nginx

#nginx配置路径
/etc/nginx

#安装acme:
curl https://get.acme.sh | sh

#卸载acme:
acme.sh –uninstall

#可能需要(按提示选择安装)
sudo apt-get update && sudo apt-get install cron
sudo apt-get update && sudo apt-get install socat

#添加软链接:
ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh

#切换CA机构:
acme.sh –set-default-ca –server letsencrypt

#申请证书:
acme.sh –issue -d 你的域名 -k ec-256 –webroot /var/www/html
请把中文字 你的域名 替换成xxx.xx形式的域名

#安装证书:
acme.sh –install-cert -d 你的域名 –ecc \
–key-file /etc/ssl/private/private.key \
–fullchain-file /etc/ssl/private/fullchain.cer \
–reloadcmd “systemctl force-reload nginx”

#全国ICMP Ping监控节点地址
https://www.nodeseek.com/post-82748-1

#哪吒仪表盘监控地址
https://github.com/hamster1963/nezha-dash

#变量值
变量名称:BUN_VERSION
值:1.1.29

变量名称:NODE_VERSION
值:22.9.0

变量名称:NezhaBaseUrl
值:你的面板完整地址,要带https://

变量名称:NezhaAuth
值:哪吒面板获取的API Token

Production compatibility flags:
nodejs_compact

变量名称(用于关闭卡通人物):NEXT_PUBLIC_DisableCartoon
值:true

#nginx配置

#user  nobody;
worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       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  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server
{
    #listen [::]:80;   #监听端口 IPv6
    #listen [::]:443 ssl;    #监听端口 带SSL iPv6
    listen 80; #ipv4
    listen 443 ssl;  #ipv4
    server_name nezha.ashboy.top; #填写监控网站域名
    index index.php index.html index.htm default.php default.htm default.html;
    root /home/web/nezha;
    #index root部分随便写 没用的
    
    #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
    #error_page 404/404.html;
    ssl_certificate    /etc/ssl/private/fullchain.cer;   #SSL证书文件
    ssl_certificate_key    /etc/ssl/private/private.key;  #SSL密钥文件
    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;
    add_header Strict-Transport-Security "max-age=31536000";
    error_page 497  https://$host$request_uri;
 
#以下是反代内容 如果有特别设置端口记得修改 
   
location / 
{
    proxy_pass http://127.0.0.1:8008;
    proxy_set_header Host $http_host;
    proxy_set_header      Upgrade $http_upgrade;
}
location /ws
{
    proxy_pass http://127.0.0.1:8008;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
}
}
}

 

相关导航

暂无评论

暂无评论...