smokeping 安裝與 smokeping_prober 服務建立

安裝 smokeping:

apt install smokeping

建立 smokeping_prober >> smokeping_prober

Nginx 反向代理 conf:

server {
    listen 80;
    server_name YOURDOMAIN;
    location / {
        return 301 https://$server_name$request_uri;
    }
}


server {
    server_name YOURDOMAIN;
    listen 443 ssl http2;
    ssl_certificate /etc/letsencrypt/live/YOURDOMAIN/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/YOURDOMAIN/privkey.pem; # managed by Certbot
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_dhparam /etc/ssl/certs/dhparam.pem;
        ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256>
        ssl_session_timeout 1d;
        ssl_session_cache shared:SSL:50m;
        ssl_stapling on;
        ssl_stapling_verify on;
        ssl_session_tickets on;
        add_header X-Robots-Tag none;
        location / {
        return 301 https://$server_name/smokeping/;
   }
        location /smokeping {
        proxy_pass http://IPADDRESS/smokeping;
        proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Port $server_port;
 }
}

 

 

 

阅读剩余
THE END