一:Nginx虚拟主机

  • 基于多IP的方式

    • 基于多端口的方式

      • 基于多域名的方式
1.基于ip的方式
[root@web01 conf.d]# cat game2.conf
server {
listen 80;
server_name 192.168.15.7;
location / {
root /opt/Super_Marie;
index index.html;
}
}
server {
listen 80;
server_name 172.16.1.7;
location / {
root /opt/tank;
index index.html;
}
}
2、基于多端口的方式
[root@web01 conf.d]# cat game3.conf
server {
listen 80;
server_name 192.168.15.7;
location / {
root /opt/Super_Marie;
index index.html;
}
}
server {
listen 81;
server_name 192.168.15.7;
location / {
root /opt/tank;
index index.html;
}
}
3、基于多域名的方式
[root@web01 conf.d]# cat game4.conf
server {
listen 80;
server_name www.game.com;
location / {
root /opt/Super_Marie;
index index.html;
}
}
server {
listen 80;
server_name www.game1.com;
location / {
root /opt/tank;
index index.html;
}
}

最新文章

  1. 微信开发包注意jar版本:
  2. js简单弹出层、遮罩层
  3. (document).height()与$(window).height()
  4. tableView主从表在storyboard连线是 Selcetion Segue和Accessory Action的区别
  5. adb_常用命令
  6. mysql在一台服务器搭建主从1
  7. 【转】在rman增量备份中,有差异增量和累积增量的概念
  8. 把zlog封装成模块,隐藏zlog
  9. POJ 1426 Find The Multiple BFS
  10. javascript 三种弹出对话框
  11. OAuth 2.0(网转)
  12. 20160224.CCPP体系详解(0034天)
  13. VBS计时器2
  14. 利用Navicate把SQLServer转MYSQL的方法(连数据)
  15. Jmeter - 测试 http 接口
  16. Loadrunner乱码的解决办法
  17. ubuntu下安装android sdk运行模拟器出现错误:
  18. Android中如何实现EditText的自动换行
  19. 3.11 - 3.12 A day with Google
  20. mysql表大小写问题

热门文章

  1. 【LeetCode】1433. 检查一个字符串是否可以打破另一个字符串 Max Difference You Can Get From Changing an Integer
  2. 【LeetCode】295. Find Median from Data Stream 解题报告(C++)
  3. 【LeetCode】303. Range Sum Query - Immutable 解题报告(Python)
  4. 【LeetCode】394. Decode String 解题报告(Python)
  5. 【LeetCode】319. Bulb Switcher 解题报告(Python)
  6. C. Hongcow Builds A Nation
  7. MacOS使用Docker创建MySQL主主数据库
  8. Windows 11实现直播,VLC超简单实现捕获、串流、播放
  9. netty系列之:从零到壹,搭建一个SOCKS代理服务器
  10. Python Revisited Day10 (进程与线程)