Nginx(九) Nginx實際使用配置

2021-09-07 12:48:46 字數 552 閱讀 5240

1.由於在nginx中需要配置很多東西,就會使得nginx.conf配置檔案過於臃腫,所以我們會將配置檔案合理的切分。大體的配置依然在nginx.conf中,其他的配置會放在etc下面的目錄中。

2.etc檔案中一般是放置配置檔案的,所以 在 etc 中新建目錄

mkdir -p /etc/nginx/conf.d

cd /etc/nginx/conf.d

建立乙個檔案:vim virtual.conf  ,建立乙個虛擬主機配置檔案

3.將nginx.conf中 注釋掉的配置 全部刪除掉,並將 upstream 和 server 段 複製到 /etc/nginx/conf.d/virtual.conf中。如下:

4.訪問 出現tomcat的主頁,ok,成功!

Promise 實際使用

promise 實際使用 const p new promise resolve,reject then else const c res 1000 p.then res then r catch err 例項2 封裝 呼叫 ajax prefix entity1 action1 null,func...

mysql IFNULL實際使用

表 srm supplier srm sup company,srm company 關係 srm supplier 一對多 srm sup company,srm company 多對一 srm sup company 問題 取所有srm supplier資訊,其中companyname存在srm...

Linux mount實際使用

檢視所有檔案系統 裝置 fdisk l 1.當要重新掛載乙個檔案系統時 裝置 可以直接 mount o remount,rw dev sdb9 檔案系統 mnt sdb9 目錄 也可以 umount mnt sdb9 fdisk l 作用是找到所有的檔案系統,如果用df或者mount命令不能看到沒有...