@george911 感觉你们的公司回邮件的速度特别慢啊,简历的邮件隔了差不多十天回,然后我又回复我的工作地点,到现在还没有回复。或许你们很忙,但是对于这样的行为我表示很不理解...希望你们能够正视这个问题。
@ssybb1988 cool,看来是海纳百川的公司,不错
@ssybb1988 好奇技术分析的是 U3D?你们难道还做游戏?
@small_fish__ 这个是 part time job 啊,不是全职啊
发有邮件都没有回复!!!
简历已发
pg
如果按照一天 1000 个独立用户的话,如果不考虑其他架构,这种访问 DO 最低配置就够了,https://www.digitalocean.com/pricing/,最低选择$5的套餐就够了吧,但是如果考虑到其他因素不好说,推荐还是$10 以上的吧。
@zoker 看了一下 druby,让人眼前一亮
:plus1:
@flyerhzm 看了英文的 blog,好像有个 typo?
很明显阅读起来非常简单
01 的配置里面还有一个
upstream balance {
server xx.xx.xx.02:80;
}
@gazeldx 我老家是江苏的,现在在成都,目前挺符合你们要求,哈哈
@lite 到处在抢人啊
不用 rails 不就不纠结这个问题了 ==!
:thumbsup: 不错呀
@juanito 英语六级,https://github.com/Ailenswpu, i will try my best
@gazeldx 哈哈,reactnative 不错哟
go fucking do it
@small_fish__ chrome 自带这个功能,Inspect Element 之后有个手机的 icon,可以选择机型
@wuwx 就当没有 AR,前辈们在没有 AR 的时候如果遇到这种需求咋办呢?
@huacnlee 问题已经解决,是我自己犯了错误,load balancer 配置是 ok 的,但是两个 app server 把默认的配置没有删除,所以一直返回 nginx 的欢迎页面。非常感谢你。
@huacnlee 这个是 nginx 目录的 tree
├── win-utf
├── uwsgi_params
├── sites-enabled
│ └── slots-load-balancer
├── sites-available
│ └── default
├── scgi_params
├── proxy_params
├── nginx.conf
├── naxsi-ui.conf.1.4.1
├── naxsi.rules
├── naxsi_core.rules
├── mime.types
├── koi-win
├── koi-utf
├── fastcgi_params
└── conf.d
配置文件只有 sites_enabled 下面的 slots-load-balancer。这个问题找了好久,还是没有解决。
@huacnlee 107.170.216.243 这条机器所有的配置如下:
/etc/nginx/nginx.conf
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
# include /etc/nginx/naxsi_core.rules;
##
# Phusion Passenger config
##
# Uncomment it if you installed passenger or passenger-enterprise
##
# passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
# passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
# mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
# }
/etc/nginx/sites-enabled/slots-load-balancer
upstream backend {
server 192.241.225.37;
server 192.241.207.103;
}
server {
listen 80;
server_name 107.170.216.243;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering on;
proxy_pass http://backend;
access_log /var/log/nginx/proxy.log;
#proxy_http_version 1.1;
#proxy_set_header Connection "";
}
}
另外/etc/nginx/sites-enabled/default 已经被我删除,不会产生影响
@huacnlee nginx 已经重启了,配置没有问题。
在 107.170.216.243 这台机器访问curl http://192.241.225.37
返回如下:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"f96debd018","applicationID":"8067875","transactionName":"elpYRRBeCFkAQx4UBlVWWVwHHg1bAVRJ","queueTime":0,"applicationTime":46,"ttGuid":"","agentToken":null,"agent":"js-agent.newrelic.com/nr-632.min.js"}</script>
<script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function r(t){if(!n[t]){var o=n[t]={exports:{}};e[t][0].call(o.exports,function(n){var o=e[t][1][n];return r(o?o:n)},o,o.exports)}return n[t].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<t.length;o++)r(t[o]);return r}({QJf3ax:[function(e,n){function t(e){function n(n,t,a){e&&e(n,t,a),a||(a={});for(var u=c(n),f=u.length,s=i(a,o,r),p=0;f>p;p++)u[p].apply(s,t);return s}function a(e,n){f[e]=c(e).concat(n)}function c(e){return f[e]||[]}function u(){return t(n)}var f={};return{on:a,emit:n,create:u,listeners:c,_events:f}}function r(){return{}}var o="nr@context",i=e("gos");n.exports=t()},{gos:"7eSDFh"}],ee:[function(e,n){n.exports=e("QJf3ax")},{}],3:[function(e,n){function t(e){return function(){r(e,[(new Date).getTime()].concat(i(arguments)))}}var r=e("handle"),o=e(1),i=e(2);"undefined"==typeof window.newrelic&&(newrelic=window.NREUM);var a=["setPageViewName","addPageAction","setCustomAttribute","finished","addToTrace","inlineHit","noticeError"];o(a,function(e,n){window.NREUM[n]=t("api-"+n)}),n.exports=window.NREUM},{1:12,2:13,handle:"D5DuLP"}],"7eSDFh":[function(e,n){function t(e,n,t){if(r.call(e,n))return e[n];var o=t();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,n,{value:o,writable:!0,enumerable:!1}),o}catch(i){}return e[n]=o,o}var r=Object.prototype.hasOwnProperty;n.exports=t},{}],gos:[function(e,n){n.exports=e("7eSDFh")},{}],handle:[function(e,n){n.exports=e("D5DuLP")},{}],D5DuLP:[function(e,n){function t(e,n,t){return r.listeners(e).length?r.emit(e,n,t):(o[e]||(o[e]=[]),void o[e].push(n))}var r=e("ee").create(),o={};n.exports=t,t.ee=r,r.q=o},{ee:"QJf3ax"}],id:[function(e,n){n.exports=e("XL7HBI")},{}],XL7HBI:[function(e,n){function t(e){var n=typeof e;return!e||"object"!==n&&"function"!==n?-1:e===window?0:i(e,o,function(){return r++})}var r=1,o="nr@id",i=e("gos");n.exports=t},{gos:"7eSDFh"}],G9z0Bl:[function(e,n){function t(){var e=d.info=NREUM.info,n=f.getElementsByTagName("script")[0];if(e&&e.licenseKey&&e.applicationID&&n){c(p,function(n,t){n in e||(e[n]=t)});var t="https"===s.split(":")[0]||e.sslForHttp;d.proto=t?"https://":"http://",a("mark",["onload",i()]);var r=f.createElement("script");r.src=d.proto+e.agent,n.parentNode.insertBefore(r,n)}}function r(){"complete"===f.readyState&&o()}function o(){a("mark",["domContent",i()])}function i(){return(new Date).getTime()}var a=e("handle"),c=e(1),u=(e(2),window),f=u.document,s=(""+location).split("?")[0],p={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-632.min.js"},d=n.exports={offset:i(),origin:s,features:{}};f.addEventListener?(f.addEventListener("DOMContentLoaded",o,!1),u.addEventListener("load",t,!1)):(f.attachEvent("onreadystatechange",r),u.attachEvent("onload",t)),a("mark",["firstbyte",i()])},{1:12,2:3,handle:"D5DuLP"}],loader:[function(e,n){n.exports=e("G9z0Bl")},{}],12:[function(e,n){function t(e,n){var t=[],o="",i=0;for(o in e)r.call(e,o)&&(t[i]=n(o,e[o]),i+=1);return t}var r=Object.prototype.hasOwnProperty;n.exports=t},{}],13:[function(e,n){function t(e,n,t){n||(n=0),"undefined"==typeof t&&(t=e?e.length:0);for(var r=-1,o=t-n||0,i=Array(0>o?0:o);++r<o;)i[r]=e[n+r];return i}n.exports=t},{}]},{},["G9z0Bl"]);</script>
<title>SlotsServer</title>
<link data-turbolinks-track="true" href="/assets/application-de4b8a4baeea040c0602c2f3ae77ff57.css" media="all" rel="stylesheet" />
<script data-turbolinks-track="true" src="/assets/application-79b779fc5fcc60ab524424af69a14fdf.js"></script>
<meta content="authenticity_token" name="csrf-param" />
<meta content="dAr/Sxe0y55DZkH4AAA6FWxaqLpLgoPWXZy9Wfqqw8Q=" name="csrf-token" />
</head>
<body>
hello
</body>
</html>
是正常的结果。
@huacnlee 最新的配置文件为
upstream backend {
server 192.241.225.37;
server 192.241.207.103;
}
server {
listen 80;
server_name 107.170.216.243;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering on;
proxy_pass http://backend;
access_log /var/log/nginx/proxy.log;
#proxy_http_version 1.1;
#proxy_set_header Connection "";
}
}
前面也没有server { .. }
现在还是显示 nginx 的默认页面!