How to configure virtual domain name of wamp in Windows environment

  • 2020-06-01 11:21:19
  • OfStack

To modify the service domain name, it is mainly to modify the configuration file about apache

1 turn on mod_rewrite for apache


LoadModule rewrite_module modules/mod_rewrite.so// Delete the preceding #

2. Introduce the http-vhosts file


Include conf/extra/httpd-vhosts.conf// Delete the preceding #

3 go into the conf/extra folder and find the http-hosts file


NameVirtualHost*:80  // The binding 80 port           listen  The port number // Manually set monitor 
<VirtualHost *:80>
  ServerAdmin suibainxie@suibian.com
  DocumentRoot "D:/Install/wamp/www/ Your directory "
  ServerName www. Your domain name .com
</VirtualHost>

Enable access rights

Back to the configuration file


<Directory />
  Options FollowSymLinks
  AllowOverride All
  Order deny,allow
  Allow from all
  Require all granted
</Directory>

After finding the above, load the bottom of virhost

Modify the

<Directory /> The slash is the absolute path for your folder

5. Modify the hosts file pointing of windows.


Related articles: