The Hottest Porn Videos Online mecum.porn Quality porns videos Free indian porn tube videos indiansexmovies.mobi hot indian women watch online

Tag: Notes

13 Posts

Node版本切换
In the lastest nodejs version the Buffer() constructor has been deprecated DEP0005: Buffer() constructor# Type: Runtime (supports --pending-deprecation) The Buffer() function and new Buffer() constructor are deprecated due to API usability issues that can potentially lead to accidental security issues. As an alternative, use of the following methods of constructing Buffer objects is strongly recommended: Buffer.alloc(size[, fill[, encoding]]) - Create a Buffer with initialized memory. Buffer.allocUnsafe(size) - Create a Buffer with uninitialized memory. Buffer.allocUnsafeSlow(size) - Create a Buffer with uninitialized memory. Buffer.from(array) - Create a Buffer with a copy of array Buffer.from(arrayBuffer[, byteOffset[, length]]) - Create a Buffer that wraps the given arrayBuffer. Buffer.from(buffer) - Create a Buffer that copies buffer. Buffer.from(string[, encoding]) - Create a Buffer that copies string. As of v10.0.0, a deprecation warning is printed at runtime when --pending-deprecation is used or when the calling code is outside node_modules in order to better target developers, rather than users. how to switch diffirent versions use module n npm install n -g Usesudo n versionto install specific version And use sudo nto switch Howerver…
【转】Ubuntu 16.04安装配置Nginx使用Let’s Encrypt
【原文】Ubuntu 16.04安装配置Nginx使用Let's Encrypt Let’s Encrypt是新的认证授权(CA)方式,使用它可以获得免费的TLS/SSL证书-使用HTTPS加密web server。Let’s Encrypt依然在测试阶段,目前,它只支持在Apache web服务器上实现自动安装。但是,Let’s Encrypt允许我们非常容易的获得一个免费的SSL证书,之后我们可以在web服务器上手动配置安装。 本文涉及: 在Ubuntu 16.04上安装Nginx 使用Let’s Encrypt获得免费的SSL证书 配置Nginx使用SSL证书 怎么自动更新SSL证书 安装前提 你必须有一个域名 域名的A记录指向要配置的web服务器 你还要有Ubuntu 16.04的root权限 我使用test.com和www.test.com域名做示例,本文中所有涉及test.com的地方,需要替换为你的域名。 下载Let’s Encrypt客户端 首先使用Let’s Encrypt获得SSL证书,下载letsencrypt。 letsencrypt托管在github,使用git clone下载。 如果没有安装git,安装它: $ sudo apt-get update $ sudo apt-get install git 我把Let’s Encrypt clone到/opt目录: $ sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt 获得SSL证书 如果你没有安装Nginx,安装它: $ sudo apt-get install nginx 配置Nginx: $ sudo vim /etc/nginx/sites-available/default 在server块内添加: location ~ /.well-known { allow all; } /.well-known的用处:Let’s Encrypt服务器要对你的web服务器进行验证,确保是你的域名,你的服务器。 你也可以更改网站根目录,默认是/var/www/html 重新加载Nginx使更改生效: $ sudo systemctl reload nginx 获得SSL证书: $ cd /opt/letsencrypt $ ./letsencrypt-auto certonly -a webroot --webroot-path=/var/www/html -d test.com -d www.test.com 在安装过程中提示输入邮箱,用来恢复密钥 接受协议 如果成功,会输出如下信息: IMPORTANT NOTES: ... - Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/test.com/fullchain.pem. Your cert will expire on 2016-06-15. To obtain a new version of the certificate in the future, simply run Let's Encrypt again. ... 注意证书保存路径和过期时间。 如果有错误,注意打开防火墙的80和443端口。 其实证书文件保存在/etc/letsencrypt/archive目录中,/etc/letsencrypt/live/test.com里的证书只是指向/etc/letsencrypt/archive最新证书的链接。获得的证书文件: sudo ls -l /etc/letsencrypt/live/test.com cert.pem: 你域名的证书 chain.pem: Let’s Encrypt chain证书 fullchain.pem: cert.pem 和 chain.pem 合并 privkey.pem: 你的证书密钥 为了增加安全,你应该生成Diffie-Hellman: $ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 下面你需要配置Nginx使用fullchain.pem做为证书文件,privkey.pem做为密钥。 配置Nginx使用TLS/SSL 现在已经有了SSL证书,下面来配置Nginx使用证书。 编辑Nginx配置文件/etc/nginx/sites-available/default: $ sudo vim /etc/nginx/sites-available/default 找到server块,注释或删除掉以下行: listen 80 default_server; listen [::]:80 default_server; 在server块内添加如下配置代码使用HTTPS: listen…
Install Nginx On Ubuntu 16.04
【原文】How To Install Nginx on Ubuntu 16.04 install nginx Nginx is available in Ubuntu's default repositories, so the installation is rather straight forward. sudo apt-get update sudo apt-get install nginx Adjust the Firewall (use ufw) get a listing of the application profiles sudo ufw app list //Output Available applications: Nginx Full Nginx HTTP Nginx HTTPS OpenSSH enable sudo ufw allow 'Nginx HTTP' verify sudo ufw status Check your Web Server systemctl status nginx Manage the Nginx Process sudo systemctl stop nginx sudo systemctl start nginx sudo systemctl restart nginx //If you are simply making configuration changes, Nginx can often reload without dropping connections. To do this, this command can be used: sudo systemctl reload nginx By default, Nginx is configured to start automatically when the server boots. If this is not what you want, you can disable this behavior by typing: sudo systemctl disable nginx To re-enable the service to start up at boot, you can type: sudo systemctl enable nginx Get Familiar with Important Nginx Files and Directories Content /var/www/html: The actual web content,…