#坑1
如果winserver中启动的时候,用cmd启动nginx.exe能看到报错
#坑2, 网址长度限制,设置为64
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 64;
#http服务器
#resume
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
}
#反向代理
#police.huyanwei.cn
upstream police.huyanwei.cn{
server 132.232.2.58:10001;
}
server {
listen 80;
server_name police.huyanwei.cn;
location / {
proxy_pass http://police.huyanwei.cn;
index index.html index.htm;
}
}
#坑2
proxy_pass 必须写server_name,即police.huyanwei.cn,否则会出现静态文件映射错误