step1:设置映射关系
编辑:C:WindowsSystem32driversetcHOSTS
增加:127.0.0.1 tpblog.cn
step2:编辑apache配置文件 httpd.conf
最末尾增加:因为我这边是8081端口,自行对应修改
<virtualhost *:8081> ServerName tpblog.cn DocumentRoot E:xampphtdocs pblogpublic </virtualhost>
访问路径:
http://tpblog.cn:8081/admin