會使用Ngix為配合公司資安政策,內部系統不能直接發查外部API,因此在DMZ區建立跳板 當然Nginx的強大也不只是做代理(Proxy), ### Step 1 Nginx環境設定 Windows版下載 http://nginx.org/en/docs/windows.html 載入後放置server上 隨便找一個你爽的地方放 範例 ⇾ C:\Users\Administrator\Desktop\nginx-1.25.3 接下來 打開Cmd (以系統管理員身分執行)  移動到資料夾下 ```C! Cd C:\Users\Administrator\Desktop\nginx-1.25.3\conf ``` 執行nginx,此時會有視窗閃一下 ```C! start nginx ``` 接下來確認是否運行 ```C! tasklist /fi "imagename eq nginx.exe" ``` 可以看到以下結果,代表已順利啟動  ### step2 設定轉導 \nginx-1.25.3\conf 打開nginx.conf 所有轉導相關都在這裡設定  ```C! server { listen 8008; //監聽Port location / { proxy_pass http://10.20.231.235:8008; } //轉導目的地 } ``` 設定完之後,重新載入config ```C! nginx -s reload ``` 這樣就可以完成初步的轉導囉! 其他的下次再說 掰餔
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up