【发布时间】:2015-03-22 14:44:35
【问题描述】:
我想知道如何测试 nginx 作为代理是否正常工作 我的系统是 ubuntu-server 我想知道nginx是不是真的把所有的静态数据都拿走了而apache没有,因为有时候有人说apache也可以和nginx一起操作静态数据
【问题讨论】:
标签: apache nginx ubuntu-server web-development-server
我想知道如何测试 nginx 作为代理是否正常工作 我的系统是 ubuntu-server 我想知道nginx是不是真的把所有的静态数据都拿走了而apache没有,因为有时候有人说apache也可以和nginx一起操作静态数据
【问题讨论】:
标签: apache nginx ubuntu-server web-development-server
您可以使用以下命令:
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
【讨论】: