ssh/scp是很常用的命令,发现对有些主机, ssh建立连接速度特别慢,连接建立之后执行操作速度却很正常。
用 ssh -v 来查看详细的连接建立过程:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unsp...
大家都有遇到过可以通过ip直接访问网站,这样理论上不利于SEO的优化。
所以我们希望可以避免直接用IP访问网站,而只能通过域名访问。
具体怎么做呢,看下面。
官方文档中提供的方法:
If you do not want to process requests with undefined "Host" header lines, you may define a default server that just drops the requests:
server {
listen 80 default_server;
...