最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(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ī)的評論 (共 條)

分享到微博請遵守國家法律
麦盖提县| 高陵县| 德化县| 武安市| 连州市| 兴安县| 铅山县| 滁州市| 积石山| 古浪县| 墨脱县| 方城县| 静乐县| 屯留县| 永仁县| 宿松县| 神池县| 金川县| 南川市| 乌拉特前旗| 鄂州市| 东港市| 永胜县| 双鸭山市| 丁青县| 郎溪县| 廉江市| 平谷区| 遂溪县| 香港 | 和田市| 松潘县| 横山县| 休宁县| 庆元县| 永福县| 饶平县| 南郑县| 新竹市| 双鸭山市| 安龙县|