Nginx本身也是一个静态资源的服务器,当只有静态资源的时候,就可以使用Nginx来做服务器,同时现在也很流行动静分离,就可以通过Nginx来实现,首先看看Nginx做静态资源服务器 ~~~ server { listen 80; server_name localhost; client_max_body_size 1024M; location / { root e:wwwroot; index index.html; } } ~~~ 这样如果访问[http://localhost](http://localhost/)就会默认访问到E盘wwwroot目录下面的index.html,如果一个网站只是静态页面的话,那么就可以通过这种方式来实现部署。