[問題] Initial Server Setup with Ubuntu 16.04
https://goo.gl/e7FS7A
大大好
我照這篇想架一個server
但我第一步就失敗了
ssh root@your_server_ip
我是用http://whatismyipaddress.com/zh-cn/index
來查我的ip
ssh: connect to host 118.160.135.152 port 22: Connection timed out
但是出現這個
--
When we toss a coin , we obtain either head or tail. Now we toss a coin 5
times. There are 2^5 possible outcomes. How many of them contain no two
consecutive heads?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.160.135.152
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1479890723.A.CD5.html
→
11/23 17:07, , 1F
11/23 17:07, 1F
→
11/23 17:08, , 2F
11/23 17:08, 2F
→
11/23 17:09, , 3F
11/23 17:09, 3F
→
11/23 17:09, , 4F
11/23 17:09, 4F
→
11/23 17:09, , 5F
11/23 17:09, 5F
→
11/23 17:16, , 6F
11/23 17:16, 6F
在請問一下
如果我只有要讓內部的電腦連線就好
這樣我的server要怎摸架設呢
※ 編輯: bjk (118.160.135.152), 11/23/2016 17:50:56
→
11/23 18:10, , 7F
11/23 18:10, 7F
→
11/23 18:18, , 8F
11/23 18:18, 8F
→
11/23 18:39, , 9F
11/23 18:39, 9F
→
11/23 21:25, , 10F
11/23 21:25, 10F
請問這個內部連線也需要嘛
推
11/23 22:33, , 11F
11/23 22:33, 11F
→
11/23 22:34, , 12F
11/23 22:34, 12F
inet addr:192.168.1.114
是這個嘛
※ 編輯: bjk (36.227.37.49), 11/24/2016 10:43:29
/var/www/html# ls
jquery.js test_form.html
我在自己的電腦連線
http://192.168.1.114/test_form.html
可以成功的利用jquery.js 的function 來submit form
但是如果用其他電腦
可以連線到網頁
但是submit form無反應
==========
我的form是post 到nodejs run 的server
var express = require('express');
var app = express();
var bodyParser = require("body-parser");
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
var port = process.env.PORT || 8080;
app.listen(port);
app.post('/login',function(req,res){
console.log(req.body);
}
====================
test_form.html
<script src="jquery.js"> </script>
<script>
$(document).ready(function(){
$.post("http://localhost:8080/login",...
, function(data){
if(data==='done')
{
alert("login success");
}
});
});
});
</script>
</head>
<body>
<input type="button" id="submit" value="Submit"><br>
※ 編輯: bjk (36.227.37.49), 11/24/2016 11:46:21
→
11/24 13:09, , 13F
11/24 13:09, 13F
→
11/24 14:56, , 14F
11/24 14:56, 14F
→
11/24 14:56, , 15F
11/24 14:56, 15F
→
11/24 22:55, , 16F
11/24 22:55, 16F
→
11/24 22:56, , 17F
11/24 22:56, 17F
→
12/26 06:24, , 18F
12/26 06:24, 18F