net_tool_wechat_xiaochengxu icon indicating copy to clipboard operation
net_tool_wechat_xiaochengxu copied to clipboard

查IP,dig,whois,ping的小程序

net_tool_wechat_xiaochengxu

Glance

screenshot

Dependency

- CentOS 7.x
- python3.x, flask
- nginx, uwsgi, supervisord

IP API

- ip api : https://freegeoip.net/json/

install & configuration

  1. supervisord file :/etc/supervisord.d/nettool.ini
[supervisord]
[program:nettool]
command=uwsgi uwsgi_config.ini
directory=/home/www/source
user=root

autostart=true
autorestart=true

you may need to comment 'server' block in /etc/nginx/nginx.conf

  1. niginx configuration file : /etc/nginx/conf.d/nettool.conf
server {
    listen 80;
    server_name server_domain_or_IP;
    return 301 https://$server_name$request_uri;
}
server {
        listen 443 ssl;
        server_name server_domain_or_IP;
        ssl_certificate /etc/letsencrypt/live/example.com/cert.pem;
        ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

        location / {
        include uwsgi_params;
        uwsgi_pass unix:/home/user/myproject/myproject.sock;
    }
}

  1. run sh restart_service.sh