国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 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>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 肥西县| 石河子市| 龙岩市| 五大连池市| 双柏县| 峨山| 麟游县| 三河市| 五指山市| 凌源市| 肥西县| 沭阳县| 五莲县| 广昌县| 武鸣县| 高州市| 浏阳市| 桓台县| 浮梁县| 红安县| 瓮安县| 韩城市| 奉贤区| 延川县| 宾阳县| 耿马| 江阴市| 辉县市| 册亨县| 巴彦县| 泗洪县| 宜昌市| 北票市| 香格里拉县| 永丰县| 贺兰县| 衡阳县| 资中县| 福海县| 莲花县| 桃江县|