麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 網站 > Apache > 正文

Apache虛擬主機的配置和泛域名解析實現代碼

2024-08-27 18:29:42
字體:
來源:轉載
供稿:網友
虛擬主機的配置
  基于IP地址的虛擬主機配置
  Listen 80
  DocumentRoot /www/jb51
  ServerName
  DocumentRoot /www/jb512
  ServerName
  基于IP和多端口的虛擬主機配置
  Listen 172.20.30.40:80
  Listen 172.20.30.40:8080
  Listen 172.20.30.50:80
  Listen 172.20.30.50:8080
  DocumentRoot /www/jb51-80
  ServerName
  DocumentRoot /www/jb51-8080
  ServerName
  DocumentRoot /www/example2-80
  ServerName
  DocumentRoot /www/example2-8080
  ServerName
  單個IP地址的服務器上基于域名的虛擬主機配置:
  # Ensure that Apache listens on port 80
  Listen 80
  # Listen for virtual host requests on all IP addresses
  NameVirtualHost *:80
  DocumentRoot /www/jb51
  ServerName
  ServerAlias vevb.com. *.vevb.com
  # Other directives here
  DocumentRoot /www/example2
  ServerName
  # Other directives here
  在多個IP地址的服務器上配置基于域名的虛擬主機:
  Listen 80
  # This is the “main” server running on 172.20.30.40
  ServerName server.domain.com
  DocumentRoot /www/mainserver
  # This is the other address
  NameVirtualHost 172.20.30.50
  DocumentRoot /www/jb51
  ServerName
  # Other directives here …
  DocumentRoot /www/example2
  ServerName
  # Other directives here …
  在不同的端口上運行不同的站點:
  基于多端口的服務器上配置基于域名的虛擬主機。
  Listen 80
  Listen 8080
  NameVirtualHost 172.20.30.40:80
  NameVirtualHost 172.20.30.40:8080
  ServerName
  DocumentRoot /www/domain-80
  ServerName
  DocumentRoot /www/domain-8080
  ServerName
  DocumentRoot /www/otherdomain-80
  ServerName
  DocumentRoot /www/otherdomain-8080
  基于域名和基于IP的混合虛擬主機的配置:
  Listen 80
  NameVirtualHost 172.20.30.40
  DocumentRoot /www/jb51
  ServerName
  DocumentRoot /www/example2
  ServerName
  DocumentRoot /www/example3
  ServerName
  網站泛域名解析
  添加一個虛擬主機配置(如下):
  
  DocumentRoot d:/web/jb51 # 網站根目錄的絕對路徑
  ServerName # 網站域名
  ServerAlias *.vevb.com # 網站泛域名

APACHE泛域名配置參考

NameVirtualHost 192.168.0.110

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/workplace/"
ServerName
<Directory "E:/InterRoot/workplace/">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/busymouse_test/"
ServerName
<Directory "E:/InterRoot/busymouse_test/">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/iptv_for_browser/auth"
ServerName auth.billing.com
ServerAlias auth.billing.com *.auth.billing.com
#泛域名解析
ErrorLog "E:/InterRoot/iptv_for_browser/serverlog/apache.log"
<Directory "E:/InterRoot/iptv_for_browser/auth">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/iptv_for_browser/api"
ServerName voiz.billing.com
ErrorLog "E:/InterRoot/iptv_for_browser/serverlog/apache.log"
<Directory "E:/InterRoot/iptv_for_browser/api">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/iptv_for_browser/user"
ServerName user.billing.com
ErrorLog "E:/InterRoot/iptv_for_browser/serverlog/apache.log"
<Directory "E:/InterRoot/iptv_for_browser/user">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/iptv_for_browser/center"
ServerName center.billing.com
ErrorLog "E:/InterRoot/iptv_for_browser/serverlog/apache.log"
<Directory "E:/InterRoot/iptv_for_browser/center">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/iptv_for_browser/img"
ServerName img.billing.com
ErrorLog "E:/InterRoot/iptv_for_browser/serverlog/apache.log"
<Directory "E:/InterRoot/iptv_for_browser/img">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/iptv_for_browser/log"
ServerName log.billing.com
ErrorLog "E:/InterRoot/iptv_for_browser/serverlog/apache.log"
<Directory "E:/InterRoot/iptv_for_browser/log">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.110:80>
DocumentRoot "E:/InterRoot/billing_new/front"
ServerName admin.billing.com
ErrorLog "E:/InterRoot/iptv_for_browser/serverlog/apache.log"
<Directory "E:/InterRoot/billing_new/front">
AllowOverride FileInfo
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 久久国产28 | 久久精品探花 | 国产精品一品二区三区四区18 | 久久精品欧美电影 | 成人在线视频一区 | 久久91久久久久麻豆精品 | 国产精品久久久久久久久久久久久久久 | 九九热国产视频 | 色999中文字幕 | 成人在线视频精品 | 九九热精品视频在线 | 毛片在线免费观看完整版 | 性爱网站 | 精品亚洲一区二区三区 | 日韩黄色片在线观看 | av成人在线观看 | 国产黄网 | 免费在线观看毛片视频 | av在线浏览 | 色交视频| 在线成人看片 | 黄视频网站免费 | 在线成人免费网站 | 久久久中精品2020中文 | 精品国产一区二区三区天美传媒 | 黄色特级视频 | 一本色道久久综合狠狠躁篇适合什么人看 | 激情av在线 | 九九热精品视频在线播放 | 久久久久久久久久久影视 | 久久99精品久久久久久236 | 国产羞羞视频在线观看 | 久久精品一级片 | 一级黄色片武则天 | 久久精品a一级国产免视看成人 | 激情久久免费视频 | 免费亚洲视频在线观看 | 澳门一级淫片免费视频 | 久久精品视频亚洲 | 懂色av懂色aⅴ精彩av | 91午夜少妇三级全黄 |