使用nginx做反向代理时,重启nginx报错
sportsManage.conf 文件
upstream webman {
server 127.0.0.1:8787;
keepalive 10240;
}
server {
listen 100;
access_log off;
root /Users/wms/sportsManage/public
location ^~ / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
if (!-f $request_filename){
proxy_pass http://webman;
}
}
}
nginx: [emerg] directive "root" is not terminated by ";" in /usr/local/etc/nginx/servers/sportsManage.conf:11
root那行结尾少了个分号
谢谢 一直在找11行的问题。。。