Apache custom domain name

step1: The mapping between

  Edit: C: \ Windows \ System32 \ drivers \ etc \ HOSTS

  Increase: 127.0.0.1 tpblog.cn

 

step2: edit apache configuration file httpd.conf

  The most added at the end:

  

# I am here is because port 8081, corresponding to modify their own 
<VirtualHost *: 8081> ServerName tpblog.cn DocumentRoot E: \ xampp \ htdocs \ tpblog \ public </ VirtualHost>

  

 Access Path:

http://tpblog.cn:8081/admin

Guess you like

Origin www.cnblogs.com/zhangwensi/p/11329312.html