1.
server {
listen 8800;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
配置文件location / 表示在nginx 服务器的根目录--》指向html目录下为服务器的根目录
在该目录下创建images目录里面放2张照片
访问:http://localhost:8800/images/2.jpg
直接在html下创建目录--》启动nginx后访问路径就是ip:端口号/创建的目录/图片名
例如:在html下创建upload文件夹