【在线等】apache如何绑定域名,只允许该域名访问服务器
现在我们的服务器很多域名都可以访问到服务器,最近发现有不是我们的注册的域名指向我们的服务器,域名没有备案,导致被电信封了两天。服务器上面放置的是apache搭建的邮箱系统
apache如何绑定域名,只允许该域名访问服务器。
http.config 配置文件如下:
==============================================================================
ServerType standalone
ServerRoot "D:/Program Files/http"
PidFile httpd.pid
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MaxRequestsPerChild 5000
ThreadsPerChild 50
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig mime.types
</IfModule>
DefaultType text/plain
HostnameLookups Off
ErrorLog "D:/Program Files/server/logs/error.log"
LogLevel warn
LogFormat "%{%Y/%m/%d-%H:%M:%S}t %h \"%r\" %>s %b " common
CustomLog "D:/Program Files/server/logs/Custom.log" common
ServerSignature Off
ServerTokens ProductOnly
<IfModule mod_mime.c>
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
#AddType application/x-compress .Z
#AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
LoadModule php4_module "C:\WINDOWS/php4/php4apache.dll"
#use php cgi mode
#ScriptAlias /php4/ "C:\WINDOWS/php4/"
#Action application/x-httpd-php "/php4/php.exe"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
BindAddress *
Port 80
ServerAdmin admin@XXXX.com
ServerName mail.XXX.com
DocumentRoot "D:/www"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "D:/www">
Options FollowSymLinks MultiViews
AllowOverride None
<Limit GET POST HEAD>
Order allow,deny
Allow from all
</Limit>
DirectoryIndex index.php index.html index.htm
</Directory>
==============================================================