安装wget,sudo等
apt install -y curl wget sudo unzip
#官方安装脚本
curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
#安装nginx
apt install -y nginx
#证书和私钥的路径(nginx配置文件里面可以找到)
/etc/ssl/private
#证书文件名
fullchain.cer
#私钥文件名
private.key
#重启nginx
systemctl restart nginx && systemctl status nginx
#面板后台域名
你的域名/dashboard
nginx配置文件
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
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 $host;
proxy_set_header Origin https://$host;
proxy_set_header nz-realip $http_CF_Connecting_IP;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
location ~ ^/(ws|terminal/.+|file/.+)$ {
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;
}
}
}
添加网络监控服务
全国三网 IP 地址
| 省份 | 联通IP | 移动IP | 电信IP |
|---|---|---|---|
| 河北 | 61.182.138.156 | 111.62.229.100 | 27.185.242.215 |
| 山西 | 60.221.18.41 | 183.201.244.91 | 1.71.157.41 |
| 辽宁 | 218.61.211.132 | 36.131.156.145 | 123.184.58.41 |
| 吉林 | 122.143.8.41 | 111.27.127.176 | 123.172.127.217 |
| 黑龙江 | 113.7.211.140 | 111.42.190.25 | 42.101.84.132 |
| 江苏 | 122.96.235.165 | 36.156.92.132 | 58.215.210.220 |
| 浙江 | 101.69.194.224 | 117.147.213.41 | 115.220.14.91 |
| 安徽 | 112.132.208.41 | 112.29.198.100 | 223.247.108.251 |
| 福建 | 36.248.48.139 | 112.50.96.88 | 106.126.10.28 |
| 江西 | 116.153.69.224 | 117.168.150.249 | 106.227.22.132 |
| 山东 | 112.240.56.143 | 120.220.145.91 | 144.123.160.140 |
| 河南 | 123.6.65.101 | 111.7.99.220 | 171.15.110.220 |
| 湖北 | 122.189.226.138 | 111.47.131.101 | 111.170.8.60 |
| 湖南 | 116.162.28.220 | 120.226.192.91 | 113.240.117.108 |
| 广东 | 112.90.211.100 | 183.240.65.191 | 183.36.23.111 |
| 海南 | 153.0.226.35 | 111.29.29.219 | 124.225.43.220 |
| 四川 | 101.206.163.49 | 183.220.151.41 | 118.123.218.220 |
| 贵州 | 117.187.254.132 | 61.243.18.220 | 58.42.61.132 |
| 云南 | 14.204.150.41 | 36.147.44.219 | 222.221.102.220 |
| 陕西 | 123.139.127.132 | 111.19.148.100 | 124.115.14.100 |
| 甘肃 | 59.81.94.53 | 117.157.16.41 | 118.182.228.91 |
| 青海 | 116.177.237.137 | 111.12.152.170 | 223.221.216.219 |
| 内蒙古 | 116.114.98.41 | 117.161.76.41 | 110.76.186.70 |
| 广西 | 171.39.5.51 | 36.136.112.41 | 222.217.93.55 |
| 西藏 | 43.242.165.35 | 117.180.234.41 | 113.62.176.89 |
| 宁夏 | 116.129.226.28 | 111.51.155.214 | 222.75.44.220 |
| 新疆 | 116.178.77.40 | 36.189.208.164 | 110.157.243.45 |
| 北京 | 202.108.29.159 | 222.35.73.1 | 220.181.173.35 |
| 天津 | 116.78.119.56 | 111.31.236.35 | 42.81.98.35 |
| 上海 | 59.81.65.42 | 183.194.219.220 | 101.227.191.14 |
| 重庆 | 113.207.69.190 | 221.178.81.101 | 119.84.131.101 |
来源于腾讯云开发者社区分享
原帖https://cloud.tencent.com/developer/article/2548448?policyId=1004
苹果移动端配置
V0版本使用域名/IP地址加Token连接
V1版本使用域名/IP地址加管理员用户和密码连接