wamp域名访问

  • 在C:\Windows\System32\drivers\etc\hosts文件中
    127.0.0.1 www.tp5.com
    127.0.0.1 localhost
  • 在 C:\wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf文件中
 <VirtualHost *:80>
   ServerName localhost
   ServerAlias localhost
   DocumentRoot c:/wamp/www
   <Directory  "c:/wamp/www">
   	Options +Indexes +Includes +FollowSymLinks +MultiViews
   	AllowOverride All
   	Require local
   </Directory>
</VirtualHost>
<VirtualHost *:80>
   ServerName www.tp5.com
   ServerAlias www.tp5.com
   DocumentRoot c:/wamp/www/think/public
   <Directory  "c:/wamp/www/think/public">
   	Options +Indexes +Includes +FollowSymLinks +MultiViews
   	AllowOverride All
   	Require local
   </Directory>
</VirtualHost>
发布了122 篇原创文章 · 获赞 5 · 访问量 4838

猜你喜欢

转载自blog.csdn.net/weixin_41254345/article/details/104344360
今日推荐