修改VPS的DNS
今天突然发现打开页面很卡,测试了一下静态页面,速度很快。
因为打开静态页面的速度很快,nginx应该没问题,其后查看Nginx的错误日志,也没有发现明显的错误出现。
打开无数据库的页面也很快,所以就剩下一个Mysql了
在看了一下Mysql的慢查询日志后就发现如下代码
[16-Oct-2013 13:17:43] [pool www] pid 19134 script_filename = /htdocs/shiniv.com/blog.shiniv.com//index.php [0x08f83180] curl_exec() /htdocs/shiniv.com/blog.shiniv.com/wp-content/plugins/wp-minify/wp-minify.php:397 [0x08f83068] fetch_and_cache() /htdocs/shiniv.com/blog.shiniv.com/wp-content/plugins/wp-minify/wp-minify.php:623 [0x08f82fb8] get_cached_minify_urls() /htdocs/shiniv.com/blog.shiniv.com/wp-content/plugins/wp-minify/wp-minify.php:598 [0x08f82ed8] build_minify_urls() /htdocs/shiniv.com/blog.shiniv.com/wp-content/plugins/wp-minify/wp-minify.php:834 [0x08f82e1c] inject_js() /htdocs/shiniv.com/blog.shiniv.com/wp-content/plugins/wp-minify/wp-minify.php:886 [0xbf8685f8] modify_buffer() unknown:0 [0x08f82dac] ob_end_flush() /htdocs/shiniv.com/blog.shiniv.com/wp-content/plugins/wp-minify/wp-minify.php:916 [0xbf868948] post_content() unknown:0 [0x08f82c98] call_user_func_array() /htdocs/shiniv.com/blog.shiniv.com/wp-includes/plugin.php:406 [0x08f82c30] do_action() /htdocs/shiniv.com/blog.shiniv.com/wp-includes/general-template.php:1617 [0x08f82bcc] wp_footer() /htdocs/shiniv.com/blog.shiniv.com/wp-content/themes/pixelpower-1/footer.php:16 [0x08f82b04] +++ dump failed
在VPS下试了下CURL博客页面,大概要几秒钟才显示具体代码。
这个应该就是DNS的问题,修改下就好了。
首先,查看下当前的DNS服务器地址
cat /etc/resolv.conf
然后编辑它
vi /etc/resolv.conf
将nameserver改为8.8.8.8或者8.8.4.4 ,如果VPS在国内的话,有可能还会被墙,更换为114.114.114.114就好了。
保存退出,再试一下运行
curl http://blog.shiniv.com
看看速度是不是很快呢~~
【声明】本文 修改VPS的DNS 为柠之漠然原创文章,转载请注明出自
枫之落叶
并保留本文有效链接:https://blog.shiniv.com/2013/10/modify-vps-dns/ , 转载请保留本声明!
已阅~