apache + nginx作为代理测试

时间:2015-01-23 14:23:44

标签: apache nginx ubuntu-server web-development-server

我想知道如何测试nginx是否正常作为代理 我的系统是ubuntu-server 我想知道nginx是否真的需要所有静态数据而apache没有,因为有时人们会说,apache也可以与nginx一起运行静态数据

1 个答案:

答案 0 :(得分:0)

您可以使用以下命令:

wget --server-response --spider --recursive --level=1 --accept=png,css,js \
  http://host/ 2>&1 | grep -P "^(  Server|--)"

输出如下:

--2015-01-27 14:23:34--  http://wiki.nginx.org/Main
  Server: nginx/1.5.12
--2015-01-27 14:23:36--  http://wiki.nginx.org/robots.txt
  Server: nginx/1.5.12
--2015-01-27 14:23:37--  http://wiki.nginx.org/local/nginx-logo.png
  Server: nginx/1.5.12
--2015-01-27 14:23:37--  http://wiki.nginx.org/local/install.png
  Server: nginx/1.5.12
--2015-01-27 14:23:37--  http://wiki.nginx.org/local/modules.png
  Server: nginx/1.5.12
--2015-01-27 14:23:38--  http://wiki.nginx.org/local/addons.png
  Server: nginx/1.5.12
--2015-01-27 14:23:38--  http://wiki.nginx.org/local/configure.png
  Server: nginx/1.5.12
--2015-01-27 14:23:38--  http://wiki.nginx.org/local/community.png