您的位置:首页 > 移动开发

搭建apprtc服务器(篇章二)

2017-06-27 00:00 405 查看
摘要: 有坑你得知道

在开启服务之后会报一个错误,pushState 字样的。

路径 /root/apprtc/src/web_app/js/appcontroller.js

AppController.prototype.pushCallNavigation_ = function(roomId, roomLink) {

//不用看
//roomLink=roomLink.replace(/192\.168\.0\.176\//,'192.168.0.176:8080');
if (!isChromeApp()) {

//看这里注释掉
// window.history.pushState({'roomId': roomId, 'roomLink': roomLink}, roomId,
// roomLink);
}
};

AppController.prototype.displaySharingInfo_ = function(roomId, roomLink) {

//不用看
//roomLink=roomLink.replace(/192\.168\.0\.176\//,'192.168.0.176:8080');
this.roomLinkHref_.href = roomLink;
this.roomLinkHref_.text = roomLink;
this.roomLink_ = roomLink;
this.pushCallNavigation_(roomId, roomLink);
this.activate_(this.sharingDiv_);
};

------------nginx ---------没错请忽略。。。。。。。。。。。。

upstream roomserver{
server 192.168.0.176:8080;
}

server {
listen 80;
server_name 192.168.0.176;
return 301 https://$server_name$request_uri; }

server {
root /usr/share/nginx/html;
index index.php index.html index.htm;
listen 443;
ssl on;
ssl_certificate /root/cert/hxtest.crt.pem;
ssl_certificate_key /root/cert/hxtest.key.pem;
server_name 192.168.0.176;
access_log /var/log/nginx/hxtest.log;
location / {
proxy_pass http://roomserver$request_uri; proxy_set_header Host $host;
}
location ~.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: