Apache domain name resolution problem?
PHP中文网
PHP中文网 2017-05-16 17:00:19
0
1
627

1. Now my Alibaba Cloud server has an independent public IP
2. A *.abc.def.com is pan-resolved to my Alibaba Cloud IP.
3. Here I am doing third-level virtual domain name resolution corresponding to different folders.
The problem we are encountering now is that apache is configured with many virtual hosts as shown below
<VirtualHost *:80>

ServerAdmin admin@linuxeye.com
DocumentRoot "/data/wwwroot/ddd/"
ServerName ddd.abc.def.com

<Directory "/data/wwwroot/weijb/">

SetOutputFilter DEFLATE
Options FollowSymLinks ExecCGI
Require all granted
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php

</Directory>
</VirtualHost>

But when I visit an unbound domain name, such as eee.abc.def.com. The website will be resolved to one of my directories (such as /data/wwwroot/XXX/) which seems to correspond to a subdirectory I recently created.
I don't want such automatic parsing. The purpose I think is that I cannot access it without a bound third-level domain name. Instead of just parsing it into one of my subdirectories.
How to configure apache?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
左手右手慢动作

Set a DocumentRoot "/data/wwwroot/" in httpd.conf

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template