五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

nginx域名配置虛擬主機(jī)

2022-02-17 13:03 作者:Vecloud_  | 我要投稿

一個(gè)域名,對應(yīng)一個(gè)IP地址

通過DNS域名解析服務(wù)器,可以將域名解析為IP地址


這里


通過修改host文件,指定域名的IP地址


host劫持


是指在host文件中,配置域名和IP地址,當(dāng)訪問域名的時(shí)候


因?yàn)椋琱ost文件中已經(jīng)有了域名所對應(yīng)的IP地址


所以,不再需要訪問DNS服務(wù)器進(jìn)行解析,直接訪問對應(yīng)的IP地址


host文件的位置


C:\Windows\System32\drivers\etc


Nginx配置文件注釋:


?[root@localhost conf]# vim nginx.confworker_processes? 1;? ? #worker進(jìn)程的數(shù)量events {? ? ? ? ? ? ? ? #事件塊的開始worker_connections? 1024;? ? ? ? ? ? #每個(gè)worker進(jìn)程支持的最大連接數(shù)}? ? ? ? ? ? ? ? ? ? ? ?#事件塊的結(jié)束http {? ? ? ? ? ? ? ? ? #HTTP區(qū)塊的開始include? ? ? ?mime.types;? ? ? ? ? ? ? ? #Nginx支持媒體類型庫文件default_type? application/octet-stream;? ? #默認(rèn)的媒體類型sendfile? ? ? ? on;? ? ? ? ? ? ? ? ? ? ? ? #開啟高速傳輸模式keepalive_timeout? 65;? ? ? ? ? ? ? ? ? ? ?#連接超時(shí)server {? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #第一個(gè)server區(qū)塊的開始? ? listen? ? ? ?80;? ? ? ? ? ? ? ? ? ? ? ? #提供服務(wù)的端口,默認(rèn)為80? ? server_name? ?www.nautilus.org ;? ? ? ? ? ? ? ? ?#提供服務(wù)的域名主機(jī)? ? location / {? ? ? ? ? ? ? ? ? ? ? ? ? ? #第一個(gè)location區(qū)塊的開始? ? ? ? root? ?html/www;? ? ? ? ? ? ? ? ? ? ? ? #站點(diǎn)的根目錄,相當(dāng)于Nginx的安裝目錄? ? ? ? index? index.html index.htm;? ? ? ? #默認(rèn)的首頁文件,多個(gè)使用空格隔開? ? }? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #第一個(gè)location區(qū)塊的結(jié)束? ? error_page? ?500 502 503 504? /50x.html;? ? #出現(xiàn)對應(yīng)的http狀態(tài)碼是,使用50x.html回應(yīng)客戶? ? location = /50x.html {? ? ? ? ? ? ? ? ? ? #location區(qū)塊的開始,訪問50x.html? ? ? ? root? ?html;? ? ? ? ? ? ? ? ? ? ? ? ? ? #指定對應(yīng)的站點(diǎn)目錄為html? ? }}}? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#HTTP區(qū)塊的結(jié)束操作步驟


[root@localhost nginx]# lsclient_body_temp? fastcgi_temp? logs? ? ? ? sbin? ? ? ?uwsgi_tempconf? ? ? ? ? ? ? html? ? ? ? ? proxy_temp? scgi_temp[root@localhost nginx]# cd html[root@localhost html]#[root@localhost html]# mkdir www? ? [root@localhost html]#? ? ? [root@localhost html]# cd www[root@localhost www]# lsindex.html[root@localhost www]# vim index.html? ?hello? localhost[root@localhost nginx]# vim /etc/hosts127.0.0.1? ?localhost localhost.localdomain localhost4 localhost4.localdomain4::1? ? ? ? ?localhost localhost.localdomain localhost6 localhost6.localdomain6172.31.1.32

了解更多相關(guān)內(nèi)容歡迎關(guān)注http://www.vecloud.com/

nginx域名配置虛擬主機(jī)的評論 (共 條)

分享到微博請遵守國家法律
原平市| 石首市| 酒泉市| 会理县| 乐陵市| 凉山| 垣曲县| 岐山县| 界首市| 宾川县| 龙胜| 东乌珠穆沁旗| 滦南县| 松阳县| 沙洋县| 云南省| 青浦区| 蕲春县| 仁怀市| 巩留县| 布尔津县| 顺平县| 巴林右旗| 北票市| 榆社县| 永和县| 图片| 库车县| 巩留县| 安泽县| 诸暨市| 福清市| 永吉县| 通州区| 称多县| 广安市| 新宁县| 恩施市| 宾阳县| 文登市| 密山市|