如何将域名分配给wamp中的虚拟主机

时间:2015-07-09 13:39:41

标签: php

我有域名我想知道如何将域名连接到我的虚拟主机我是新的,所以请回答易于理解的答案感谢阅读并希望回答

我更改了热门文件C:\ WINDOWS \ system32 \ drivers \ etc

127.0.0.1 www.test.com

并且还更改httpd-vhosts.conf D:\ wamp \ bin \ apache \ Apache2.4.4 \ conf \ extra

    ServerAdmin webmaster@test.org.in     DocumentRoot" c:\ wamp \ www \ test"     ServerName test.org.in     ErrorLog" logs / test.org.in-error.log"     CustomLog" logs / test.org.in-access.log"共同

1 个答案:

答案 0 :(得分:1)

您可以使用 httpd-vhosts.conf 文件

这是一个小例子

<VirtualHost *:80>  

ServerAdmin webmaster@localhost
ServerName www.mydns.local
ServerAlias www.mydns.local
DocumentRoot "E:\WWW_VM_SHARE\smarty_fe\public"
<Directory "E:\WWW_VM_SHARE\smarty_fe\public">
    Options Indexes FollowSymLinks Includes ExecCGI MultiViews
    Require all granted
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
</VirtualHost>

可在此处找到更多信息http://httpd.apache.org/docs/2.2/en/vhosts/