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/ 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>
  DocumentRoot "D:/Install/wamp/www/ Your directory "
  ServerName www. Your domain name .com

Enable access rights

Back to the configuration file

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

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: