腾讯云分配子域名

本周知道了主机名一样能够用域名,因而便想试着分配些子域名。直接能够在云解析分配子域名启用,再在服务器设置vhost文件,添加子域名指向目录重启apache便可。web

腾讯云=>云解析=>一级域名=>点击域名添加记录=>主机记录(子域名)、记录值(ip地址)。须要将虚拟主机的注释删去!!!apache

例如chenyu.mydearest.cn服务器

<VirtualHost *:80>ide

 ServerAdmin help@websoft9.comrest

 DocumentRoot "C:/websoft9/wampstack-7.0.7-0/apache2/htdocs/myself/"ip

 ServerName chenyu.mydearest.cn域名

 ServerAlias chenyu.mydearest.cnio

 ErrorLog "logs/demo.websoft9.cn-error.log"腾讯

 CustomLog "logs/demo.websoft9.cn-access.log" commonerror

   <Directory "C:/websoft9/wampstack-7.0.7-0/apache2/htdocs/" >

        Options Indexes FollowSymLinks

        AllowOverride all

        Order allow,deny

        Allow from all

   </Directory>

</VirtualHost>

相关文章
相关标签/搜索