unknown directive " " in /usr/local/nginx/conf/ 的问题
方法一
报错提示一般是多了个空格,将新加的配置多余空格删除即可。
方法二
若配置文件确实没问题,可能conf文件被记事本编辑过,保存成了含[BOM] 。所以才报错的。
解决办法
使用editplus 等其它非记事本 另存为 UTF-8 不含BOM 的文件就可以了。
报错提示一般是多了个空格,将新加的配置多余空格删除即可。
若配置文件确实没问题,可能conf文件被记事本编辑过,保存成了含[BOM] 。所以才报错的。
解决办法
使用editplus 等其它非记事本 另存为 UTF-8 不含BOM 的文件就可以了。
nginx在反向代理HTTP协议的时候,默认使用的是HTTP1.0去向后端服务器获取响应的内容后在返回给客户端。
HTTP1.0和HTTP1.1的一个不同之处就是,HTTP1.0不支持HTTP keep-alive。nginx在后端服务器请求时使用了HTTP1.0同时使用HTTP Header的Connection:Close通知后端服务器主动关闭连接。这样会导致任何一个客户端的请求都在后端服务器上产生了一个TIME-WAIT状态的连接。所以我们需要在Nginx上启用HTTP1.1的向后端发送请求,同时支持Keep-alive。
我们增加三个参数keepalive 50,proxy_http_version 1.1 , proxy_set_header Connection 来配置。
upstream http_backend {
server 127.0.0.1:8080;
keepalive 50;
}
server {
...
location /http/ {
proxy_pass http://http_backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
...
}
}
//[ self.contentTextField setValue:KRGBColor(154, 154, 154, 1.0) forKeyPath:@"_placeholderLabel.textColor"];
//[ self.contentTextField setValue:[UIFont systemFontOfSize:13.0] forKeyPath:@"_placeholderLabel.font"];
//UITextField *textfield = [[UITextField alloc]init];
NSMutableAttributedString *arrStr = [[NSMutableAttributedString alloc]initWithString:self.contentTextField.placeholder attributes:@{NSForegroundColorAttributeName : KRGBColor(154, 154, 154, 1.0),NSFontAttributeName:[UIFont systemFontOfSize:13.0]}];
self.contentTextField.attributedPlaceholder = arrStr;
打开Xcode后依次点击下方菜单
Xcode > Preferences, and at the top of the window, click Accounts.
点左下角的+号,添加Apple Id,输入密码,加入账号 或 重新登录之前已经添加的Account账号。
xcode版本升级,IOS SDK会自动跟着升级!
在终端执行命令:
xcodebuild -showsdks