2017年 06月 21日 - 使用certbot+nginx搭建https服务器

    http=>https的转变

    2014年百度开始转https,2015年百度实现了搜索全站HTTPS服务,致力于向广大互联网用户提供最好的HTTPS服务.同年阿里系也迁移https. 新版的浏览器,基本上都对于http的网站表单输入进行了不安全的提示.而随着移动设备的发展,以及公共wifi热点,各种劫持也时有发生, https可以很好的解决劫持的问题.所以启用https非常有必要.

    2017年 06月 21日 - nginx -s reload 提示nvalid PID number解决

    重启了服务器后,启动nginx失败:

    $ nginx -s reload
    nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
    

    错误说的文件:/usr/local/nginx/logs/nginx.pid定义的pid值是”“,是一个非法的pid数值.

    2017年 06月 21日 - Linux下使用sudo执行命令提示command not found

    执行nginx -t 权限不足

    $ nginx -t
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    

    原因是自己的nginx.conf配置使用的80端口号,系统默认低于1024的端口号,是需要管理员权限的.

    2017年 06月 14日 - DungProxy源码学习(四)

    域名校验

    CheckController.java

    api : /proxyipcenter/checkUrlTask
    param : url
    descriyption : 根据给出的url进行域名校验 # 校验实现
    

    system.domain.test.forward.url