Apache如何绑定域名?

如题所述

第1个回答  2018-01-31
你是用apache做虚拟主机吗? 如果是单独一个网站,不需要绑定就可以访问,如果只限制一个域名访问的话,在httpd.conf搜索Listen 80 将其改为 Listen 域名:80 即可。如果是做虚拟主机,需要在httpd.conf最后加上像下面这样的设置:<VirtualHost ithx.net:80>
DocumentRoot "H:/website/wwwroot/idc.qkweb.net/htdocs"
ServerName ithx.net:80
<Directory "H:/website/wwwroot/idc.qkweb.net/htdocs">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride Options FileInfo
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>本回答被网友采纳
相似回答