首页 文章

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

提问于
浏览
0

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

我更改了热门文件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 回答

  • 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/

相关问题