- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會(huì )理事單位
- 安全聯(lián)盟認證網(wǎng)站身份V標記
- 域名注冊服務(wù)機構許可:滇D3-20230001
- 代理域名注冊服務(wù)機構:新網(wǎng)數碼
yum install -y epel-* yum isntall -y nginx vim
mkdir /var/wwwroot mkdir /var/wwwroot/site1 mkdir /var/wwwroot/site2 echo -e "site1" >> /var/wwwroot/site1/index.html echo -e "site2" >> /var/wwwroot/site2/index.html
setenforce 0 systemctl stop firewalld systemctl disable firewalld
vim /etc/nginx/conf.d/vhosts.conf
server { listen 8081; root /var/wwwroot/site1; index index.html; location / { } } server { listen 8082; root /var/wwwroot/site2; index index.html; location / { } }
nginx
服務(wù)systemctl start nginx
http://www.tjdsmy.cn:8081/
http://www.tjdsmy.cn:8082/
vim /etc/nginx/conf.d/vhosts.conf
server { listen 80; server_name site1.test.com; root /var/wwwroot/site1; index index.html; location / { } } server { listen 80; server_name site2.test.com; root /var/wwwroot/site2; index index.html; location / { } }
nginx
服務(wù)systemctl restart nginx
hosts
文件編輯C:\Windows\System32\drivers\etc\hosts
文件,
添加以下內容(根據實(shí)際情況自己修改)
192.168.204.135 site1.test.com 192.168.204.135 site2.test.com
http://www.tjdsmy.cn/
http://www.tjdsmy.cn/
ifconfig ens33:1 192.168.204.151 ifconfig ens33:2 192.168.204.152
vim /etc/nginx/conf.d/vhosts.conf
server { listen 192.168.204.151:80; root /var/wwwroot/site1; index index.html; location / { } } server { listen 192.168.204.152:80; root /var/wwwroot/site2; index index.html; location / { } }
nginx
服務(wù)systemctl restart nginx
http://www.tjdsmy.cn/
http://www.tjdsmy.cn/
售前咨詢(xún)
售后咨詢(xún)
備案咨詢(xún)
二維碼
TOP