假設有 A,B,C,D 四臺服務器。A 是自己的機器;B 是跳板機;C,D 是線上機器,不能直接 ssh。
-A 有啥用?
你可以通過 ssh -o ProxyCommand='ssh user@B -p port -W %h:%p' user@C -p port
這樣一條命令登陸到 C。但是當你在 C 機器使用 ssh user@D
嘗試登陸 D 時,你會失敗。
但是你加上 -A
參數(shù)之后,就不會失?。?code>ssh -o ProxyCommand='ssh user@B -p port -W %h:%p' -A user@C -p port
所以:你可以認為 -A 將你的身份信息轉發(fā)了。 可以參考 ForwardAgent 配置。
-W 的話,就是轉發(fā) stdin, stdout 到目標機器上...
@RequestMapping(value = "login.do", method = RequestMethod.GET) 你這邊寫要求的是get請求啊
容器中安裝不了,可以容器外安裝啊,容器外弄好后自己封裝鏡像,然后拉進docker。
是不是你的git賬戶沒有修改權限,http://blog.csdn.net/yanzhenj...
可以按照這個配置你的git
使用react-router的createElement
解決!
Router.js
......
...... // 省略其他無關緊要代碼
// 此處為要點擊刷新的組件
const arr = [
home
];
// 開關優(yōu)化
let onOff =false;
// 頁面強制刷新,如果需要強制刷新在路由中添加onChange事件以及在組件數(shù)組添加
const createElement=(component, props) =>{
if (props.children && onOff || props.children && arr.includes(props.routes.slice(-1)[0].getComponent)) {
let children = Object.assign({}, props.children, {key : `${window.location.pathname}` + new Date().getTime()})
props = { ...props, children };
onOff = false;
}
return React.createElement(component, props)
}
const onChange = (props, next) => {
onOff = true
console.log(`${next.location.pathname}`, 'change');
}
const RouteConfig = (
<Router history={history} createElement = {createElement}>
<Route path="/home" getComponent={home} onChange = {onChange} />
...
...
</Router>
);
export default RouteConfig;
如果您用的react-router4.0,當使用 component 時,router 將使用 React.createElement 根據(jù)給定的 component 創(chuàng)建一個新的 React 元素。這意味著如果你使用內(nèi)聯(lián)函數(shù)(inline function)傳值給 component將會產(chǎn)生不必要的重復裝載。對于內(nèi)聯(lián)渲染(inline rendering), 建議使用 renderprop。
也可以參考下我新寫的文章:這里有沒有你想要的react-router
后端不要加成access-control-allow-origin為*,加成access-control-allow-origin:前端請求域名
既然HTML input
的name
是imgs[]
,那curl也用這個就行了($data['imgs[]']=$file_obj
),而不是搞個數(shù)組。
你用的webpack是哪個版本的,最新版的4.0出來了,把HtmlWebpackPlugin舍棄了,需要特別下載才行
$> yarn add html-webpack-plugin@webpack-contrib/html-webpack-plugin
只要在本地測試成功,commit,push之后,鉤子自動同步到服務器,不能直接修改服務器上的文件,否則協(xié)同開發(fā)豈不是亂套了。
我嘗試寫了一下,你看一下對不對
ip=$1
mask=$2
out=''
for index in {1..4}; do
si=$(echo $ip | cut -d "." -f $index)
sm=$(echo $mask | cut -d "." -f $index)
if [ $index -ne 1 ]
then
out="$out."
fi
out="$out$[$si&$sm]"
done
echo $out
既然題主的服務器在國外,首先判斷一下ip是否被墻,然后再看下是不是ssh的問題。建議題主把ping.pe, traceroute,和ssh的報錯都貼出來看看。
分享一下:
npm中有個scope的東東,項目中會用到npm org和微軟的ts org(分別對應著不同的scope)。項目搭建的private registry對@types scope
不支持;
至于0.12.7使用正常,完全是因為0.12.7版本下還沒有ts這個scope
解決方法:RUN echo '@types:registry=https://registry.cnpmjs.org/' >> /root/.npmrc
。
在npmrc中文件添加對@types scope
的解析
upstream
你可以當做負載均衡
,比如你做了如下配置
upstream app_weapp {
server localhost:5757;
server localhost:5758;
}
那么你收到的請求將會分流到這兩個應用,當然如果你是同一個應用部署到兩個服務器,比如
upstream app_weapp {
server 192.168.2.1:5757;
server 192.168.2.2:5757;
}
那么你的流量就會被分流到這兩個服務器,和下面的proxy_pass
是一起出現(xiàn)的,還有一些負載均衡
的算法,具體可以看文檔: Using nginx as HTTP load balancer。
http
強制跳轉到https
的確是rewrite
在起作用,大概是你改完之后沒有重新加載配置:nginx -s reload
如果是靜態(tài)頁面,可以直接刪掉 location /...
一整段的代碼,upstream
也可以刪掉,然后整塊直接用root
代替。如果一定要使用upsteam
,那么你的靜態(tài)頁面
必須部署在localhost:5757
可以訪問到的地方
解決方案1:直接拋棄upsteam
,將資源掛載在https
下
server {
listen 443;
server_name wx.ijason.cc;
root root/myweb;
ssl on;
ssl_certificate /data/release/nginx/1_wx.ijason.cc_bundle.crt;
ssl_certificate_key /data/release/nginx/2_wx.ijason.cc.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA;
ssl_session_cache shared:SSL:50m;
ssl_prefer_server_ciphers on;
}
解決方案2:保留upsteam
,添加以下配置就好了,以下配置又增加了一個應用,可以通過localhost:5757
訪問,配合上面的https
和upstream
可以讓訪問https
的流量被轉發(fā)到這里過來
server {
listen 5757;
root root/myweb;
index index.html;
}
解決了 把證書換成 https://dash.cloudflare.com/ 就好了
你加載了C.php嗎?
require('C.php');
$OPTIONS
這個環(huán)境變量沒指定?
docker rm $(docker ps -a | awk '/training\/webapp/ {print $1}')
你要裝啥?
express: npm install express
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學院和江蘇省首批服務外包人才培訓基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術與教育服務機構,發(fā)展為教育服務業(yè)的綜合性企業(yè)集團,成為集合面授教學培訓、網(wǎng)
達內(nèi)教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構,是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經(jīng)理職務負責iOS教學及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術, 熟練的跨平臺面向對象開發(fā)經(jīng)驗,技術功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術顧問,美國Dachieve 系統(tǒng)架構師,美國AngelEngineers Inc. 系統(tǒng)架構師。