Update README.md.

This commit is contained in:
BoHung Chiu 2022-08-04 12:28:36 +08:00
parent 8693b985a4
commit 8110a4374d
1 changed files with 4 additions and 44 deletions

View File

@ -49,53 +49,13 @@ $ bash -i move_site.sh $ip $port $user $remote_pass $domain $your_local_password
sudo apt install libgmp-dev ##此套件為nokogiri相依套件
```
## 安裝 Nginx 1.14
## 安裝 Nginx 1.23.1及更新openssl(至少保持1.1.1以上)
```sh
$ sudo apt update
$ sudo apt install nginx
$ nginx -v # 確認版本為 1.14
$ sudo systemctl status nginx # 查看 nginx 是否啟動
$ sudo systemctl restart nginx # 安全重啟 nginx若已啟動則可跳過此步驟
$ cd /etc/nginx/
$ sudo mkdir orbit_sites/
$ sudo vim nginx.conf # add `include /etc/nginx/orbit_sites/*;` to Virtual Host Configs block
$ sudo vim orbit_sites/xxx_ooo # 建立網站 nginx 設定檔xxx 為學校縮寫ooo 為系所、單位縮寫。內容參考附註 nginx 設定檔
$ wget http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/raw/master/install_nginx.sh -O install_nginx.sh
$ bash install_nginx.sh
$ sudo wget http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/raw/master/orbit_nginx -O /etc/nginx/orbit_sites/xxx_ooo # 建立網站 nginx 設定檔xxx 為學校縮寫ooo 為系所、單位縮寫。內容參考附註 nginx 設定檔
```
```nginx
# 此為附註 nginx 設定檔
# upstream xxx_sock {
upstream orbit_sock {
# server unix:/path/to/your/r45/tmp/unicorn.sock;
server unix:/home/rulingcom/orbit_sites/orbit/tmp/unicorn.sock;
}
server {
listen 80;
# root /path/to/your/r45/public;
root /home/rulingcom/orbit_sites/orbit/public;
# server_name your.website.address;
server_name localhost;
client_max_body_size 500m;
location / {
try_files $uri $uri/index.html $uri.html @app;
}
location @app {
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_connect_timeout 360;
# proxy_pass http://xxx_sock;
proxy_pass http://orbit_sock;
}
}
```
## 安裝 MongoDB 3.2.22
```sh
$ # 匯入 MongoDB 公鑰到套件管理系統